Skip to content

Commit

Permalink
Merge pull request #2287 from KhronosGroup/fix_2286
Browse files Browse the repository at this point in the history
Avoid crash animation + full collection hierarchy
  • Loading branch information
julienduroure committed Jul 23, 2024
2 parents fd6f411 + eaed33c commit 68ba8c3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ def gather_actions_animations(export_settings):
vtree = export_settings['vtree']
for obj_uuid in vtree.get_all_objects():

# Do not manage real collections (if case of full hierarchy export)
if vtree.nodes[obj_uuid].blender_type == VExportNode.COLLECTION:
continue

# Do not manage not exported objects
if vtree.nodes[obj_uuid].node is None:
if export_settings["gltf_armature_object_remove"] is True:
Expand Down Expand Up @@ -78,6 +82,7 @@ def prepare_actions_range(export_settings):
vtree = export_settings['vtree']
for obj_uuid in vtree.get_all_objects():

# Do not manage real collections (if case of full hierarchy export)
if vtree.nodes[obj_uuid].blender_type == VExportNode.COLLECTION:
continue

Expand Down Expand Up @@ -191,6 +196,10 @@ def prepare_actions_range(export_settings):
# Need to store animation slides
for obj_uuid in vtree.get_all_objects():

# Do not manage real collections (if case of full hierarchy export)
if vtree.nodes[obj_uuid].blender_type == VExportNode.COLLECTION:
continue

# Do not manage not exported objects
if vtree.nodes[obj_uuid].node is None:
if export_settings['gltf_armature_object_remove'] is True:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,11 @@ def armature_caching(data, obj_uuid, blender_obj, action_name, frame, export_set

def object_caching(data, obj_uuids, current_instance, action_name, frame, depsgraph, export_settings):
for obj_uuid in obj_uuids:

# Do not cache real collection
if export_settings['vtree'].nodes[obj_uuid].blender_type == VExportNode.COLLECTION:
continue

blender_obj = export_settings['vtree'].nodes[obj_uuid].blender_object
if blender_obj is None: #GN instance
if export_settings['vtree'].nodes[obj_uuid].parent_uuid not in current_instance.keys():
Expand Down

0 comments on commit 68ba8c3

Please sign in to comment.