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 987574b865 - Show all commits

View File

@ -37,6 +37,7 @@ __all__ = (
) )
import os import os
import traceback
from pathlib import Path from pathlib import Path
import bpy import bpy
@ -105,7 +106,12 @@ def export_mtlx(material):
try: try:
import materialx.utils as mx_utils import materialx.utils as mx_utils
doc = mx_utils.export(material, None) try:
doc = mx_utils.export(material, None)
except:
traceback.print_exc()
return ""
if not doc: if not doc:
return "" return ""