BLEN-358: Error in console after closing Blender #22

Merged
Bogdan Nagirniak merged 4 commits from BLEN-358_1 into hydra-render 2023-04-06 11:58:30 +02:00
Showing only changes of commit cc46fc1a0a - Show all commits

View File

@ -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 ""
@ -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
Review

remove return "" from here, move comment under except:

remove `return ""` from here, move comment under `except:`
return "" return ""