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-10-12 14:21:42 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-10-12 14:23:36 +0300
commit701d600b216b3465d19bb7cf4332186b3929422c (patch)
tree1e981ae34b2a3f20231cd67e513b825f1e9d5041 /io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py
parent50938f89b26be5b6478352cf7ac51e66ecb63338 (diff)
glTF exporter: fix exporting shapekeys animation when some sk are not animated
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py')
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py
index 2c458742..04028d20 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animation_channel_target.py
@@ -78,7 +78,8 @@ def __gather_path(channels: typing.Tuple[bpy.types.FCurve],
bake_channel: typing.Union[str, None]
) -> str:
if bake_channel is None:
- target = channels[0].data_path.split('.')[-1]
+ # Note: channels has some None items only for SK if some SK are not animated
+ target = [c for c in channels if c is not None][0].data_path.split('.')[-1]
else:
target = bake_channel
path = {