Skip to content

Commit

Permalink
Fix #2422 - fix recursivity check on gpu instances
Browse files Browse the repository at this point in the history
julienduroure committed Nov 27, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent a1e7d95 commit 15f6db2
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
@@ -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)):
@@ -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

0 comments on commit 15f6db2

Please sign in to comment.