glTF exporter: fix exporing instances when apply modifier is disabled
This commit is contained in:
parent
c172be1c93
commit
c23d2a741e
|
@ -15,7 +15,7 @@
|
|||
bl_info = {
|
||||
'name': 'glTF 2.0 format',
|
||||
'author': 'Julien Duroure, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
|
||||
"version": (1, 1, 12),
|
||||
"version": (1, 1, 13),
|
||||
'blender': (2, 81, 6),
|
||||
'location': 'File > Import-Export',
|
||||
'description': 'Import-Export as glTF 2.0',
|
||||
|
|
|
@ -283,6 +283,15 @@ def __gather_mesh(blender_object, export_settings):
|
|||
else:
|
||||
blender_mesh = blender_object.data
|
||||
skip_filter = False
|
||||
# If no skin are exported, no need to have vertex group, this will create a cache miss
|
||||
if not export_settings[gltf2_blender_export_keys.SKINS]:
|
||||
vertex_groups = None
|
||||
modifiers = None
|
||||
else:
|
||||
# Check if there is an armature modidier
|
||||
if len([mod for mod in blender_object.modifiers if mod.type == "ARMATURE"]) == 0:
|
||||
vertex_groups = None # Not needed if no armature, avoid a cache miss
|
||||
modifiers = None
|
||||
|
||||
material_names = tuple([ms.material.name for ms in blender_object.material_slots if ms.material is not None])
|
||||
|
||||
|
|
Loading…
Reference in New Issue