Skip to content

Commit

Permalink
Merge pull request #303 from Exairnous/add-import-report-to-delayed-g…
Browse files Browse the repository at this point in the history
…athers

Report import errors when calling delayed gathers.
  • Loading branch information
Exairnous authored Jul 26, 2024
2 parents 8eb5eed + 90f08ee commit a068748
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion addons/io_hubs_addon/io/gltf_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,18 @@

def call_delayed_gathers():
global delayed_gathers
global import_report
for gather_import in delayed_gathers:
gather_import()
gather_import_args = gather_import.__closure__[0].cell_contents
blender_host = gather_import_args[2]
component_name = gather_import_args[3]
try:
gather_import()
except Exception:
traceback.print_exc()
print(f"Failed to import {component_name} component on {blender_host.name} continuing on...")
import_report.append(
f"Failed to import {component_name} component on {blender_host.name}. See the console for details.")
delayed_gathers.clear()


Expand Down

0 comments on commit a068748

Please sign in to comment.