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 traceback
from pathlib import Path
import bpy
@ -105,7 +106,12 @@ def export_mtlx(material):
try:
import materialx.utils as mx_utils
try:
doc = mx_utils.export(material, None)
except:
traceback.print_exc()
DagerD marked this conversation as resolved Outdated

Move this to end of function with comment like "Important: code shouldn't raise any exception ...."

Move this to end of function with comment like "Important: code shouldn't raise any exception ...."
return ""
if not doc:
return ""