glTF exporter: animation get removed when using both TRS + SK animation
This commit is contained in:
parent
60a11a0fc4
commit
24cc252dc6
|
@ -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, 27),
|
||||
"version": (1, 1, 28),
|
||||
'blender': (2, 81, 6),
|
||||
'location': 'File > Import-Export',
|
||||
'description': 'Import-Export as glTF 2.0',
|
||||
|
|
|
@ -48,7 +48,7 @@ def gather_animations(blender_object: bpy.types.Object,
|
|||
for blender_action, track_name in blender_actions:
|
||||
|
||||
# Set action as active, to be able to bake if needed
|
||||
if blender_object.animation_data: # Not for shapekeys!
|
||||
if blender_action.id_root == "OBJECT" and blender_object.animation_data: # Not for shapekeys!
|
||||
if blender_object.animation_data.action is None \
|
||||
or (blender_object.animation_data.action.name != blender_action.name):
|
||||
if blender_object.animation_data.is_property_readonly('action'):
|
||||
|
@ -63,6 +63,8 @@ def gather_animations(blender_object: bpy.types.Object,
|
|||
print_console("WARNING", "Animation '{}' could not be exported. Cause: {}".format(blender_action.name, error))
|
||||
continue
|
||||
|
||||
# No need to set active shapekeys animations, this is needed for bone baking
|
||||
|
||||
animation = __gather_animation(blender_action, blender_object, export_settings)
|
||||
if animation is not None:
|
||||
animations.append(animation)
|
||||
|
|
Loading…
Reference in New Issue