Skip to content

Commit

Permalink
Merge pull request #2425 from KhronosGroup/fix_2422
Browse files Browse the repository at this point in the history
Fix #2422 - fix recursivity check on gpu instances
  • Loading branch information
julienduroure authored Jan 16, 2025
2 parents 99e9476 + 1625f9a commit f045782
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions addons/io_scene_gltf2/blender/exp/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ def manage_gpu_instancing(self, node, also_mesh=False):

self.nodes_idx_to_remove.extend(insts)

for child_idx in node.children:
child = self.__gltf.nodes[child_idx]
self.manage_gpu_instancing(child, also_mesh=child.mesh is not None)

def manage_gpu_instancing_nodes(self, export_settings):
if export_settings['gltf_gpu_instances'] is True:
for scene_num in range(len(self.__gltf.scenes)):
Expand All @@ -299,9 +303,6 @@ def manage_gpu_instancing_nodes(self, export_settings):
self.manage_gpu_instancing(node)
else:
self.manage_gpu_instancing(node, also_mesh=True)
for child_idx in node.children:
child = self.__gltf.nodes[child_idx]
self.manage_gpu_instancing(child, also_mesh=child.mesh is not None)

# Slides other nodes index

Expand Down

0 comments on commit f045782

Please sign in to comment.