Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Duroure <julien.duroure@gmail.com>2019-12-29 15:09:08 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-12-29 15:09:08 +0300
commit24cc252dc6f69edac3d811085253f7cbae690085 (patch)
treec10ed7b3379741672118c6fd6fbccf6e69110572
parent60a11a0fc4426f01e87be0e019c5d909889e511e (diff)
glTF exporter: animation get removed when using both TRS + SK animation
-rwxr-xr-xio_scene_gltf2/__init__.py2
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 78141088..1b581b8c 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -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',
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py
index bf78dabd..f959ce14 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py
@@ -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)