glTF exporter: Fix Variants export when Apply modifiers

Was a regression in 4.4
This commit is contained in:
Julien Duroure
2025-06-17 12:10:12 +02:00
parent 4bf1931fee
commit 41f1df2ad5
2 changed files with 3 additions and 3 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, 5, 35),
"version": (4, 5, 36),
'blender': (4, 4, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@@ -311,11 +311,11 @@ def __gather_mesh(vnode, blender_object, export_settings):
# so no need to copy them in that case, because overwriting them will crash
if len(blender_mesh.keys()) == 0:
# Copy custom properties
for prop in [p for p in blender_object.data.keys() if p not in BLACK_LIST]:
for prop in [p for p in blender_object.data.keys() if ((p not in BLACK_LIST) or p.startswith("gltf"))]:
blender_mesh[prop] = blender_object.data[prop]
else:
# But we need to remove some properties that are not needed
for prop in [p for p in blender_object.data.keys() if p in BLACK_LIST]:
for prop in [p for p in blender_object.data.keys() if (p in BLACK_LIST and not p.startswith("gltf"))]:
del blender_mesh[prop]
# Store that this evaluated mesh has been created by the exporter, and is not a GN instance mesh
blender_mesh['gltf2_mesh_applied'] = True