glTF exporter: avoid double export

Make sure to not check instances inside instances collection when GN instance is enable.
This commit is contained in:
Julien Duroure
2024-08-30 06:26:47 +02:00
parent 6191eb1e9d
commit 7c6975f6c8
2 changed files with 4 additions and 2 deletions

View File

@@ -5,7 +5,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
"version": (4, 3, 15),
"version": (4, 3, 16),
'blender': (4, 2, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@@ -448,7 +448,9 @@ class VExportTree:
dupli_world_matrix=mat)
# Geometry Nodes instances
if self.export_settings['gltf_gn_mesh'] is True:
# Make sure to not check instances for instanced collection, because we
# will export what's inside the collection twice
if self.export_settings['gltf_gn_mesh'] is True and node.blender_type == VExportNode.OBJECT:
# Do not force export as empty
# Because GN graph can have both geometry and instances
depsgraph = bpy.context.evaluated_depsgraph_get()