glTF export: When user don't export SK, driver corrective SK animations must not be exported

This commit is contained in:
Julien Duroure 2022-11-02 19:06:16 +01:00
parent 5dbcd4a388
commit c4dddb88e7
2 changed files with 5 additions and 1 deletions

View File

@ -4,7 +4,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": (3, 4, 42),
"version": (3, 4, 43),
'blender': (3, 3, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@ -8,6 +8,10 @@ from io_scene_gltf2.blender.com.gltf2_blender_data_path import get_target_object
@skdriverdiscovercache
def get_sk_drivers(blender_armature_uuid, export_settings):
# If no SK are exported --> No driver animation to export
if export_settings['gltf_morph'] is False:
return tuple([])
blender_armature = export_settings['vtree'].nodes[blender_armature_uuid].blender_object
drivers = []