forked from blender/blender
BLEN-358: Error in console after closing Blender #22
@ -106,12 +106,7 @@ def export_mtlx(material):
|
|||||||
try:
|
try:
|
||||||
import materialx.utils as mx_utils
|
import materialx.utils as mx_utils
|
||||||
|
|
||||||
try:
|
doc = mx_utils.export(material, None)
|
||||||
doc = mx_utils.export(material, None)
|
|
||||||
except:
|
|
||||||
traceback.print_exc()
|
|
||||||
return ""
|
|
||||||
|
|
||||||
if not doc:
|
if not doc:
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
DagerD marked this conversation as resolved
Outdated
|
|||||||
@ -122,4 +117,10 @@ def export_mtlx(material):
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
print("ERROR: no MaterialX addon available")
|
print("ERROR: no MaterialX addon available")
|
||||||
|
|
||||||
|
# This is a placeholder, this code will be moved to C part later
|
||||||
|
# This code shouldn't raise any exception due to breaking refcounts on RenderEngine
|
||||||
|
except:
|
||||||
|
traceback.print_exc()
|
||||||
|
return ""
|
||||||
DagerD marked this conversation as resolved
Bogdan Nagirniak
commented
remove remove `return ""` from here, move comment under `except:`
|
|||||||
|
|
||||||
return ""
|
return ""
|
||||||
|
Loading…
Reference in New Issue
Block a user
Move this to end of function with comment like "Important: code shouldn't raise any exception ...."