Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2422 - fix recursivity check on gpu instances #2425

Merged
merged 2 commits into from
Jan 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading