diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2020-02-22 10:18:21 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2020-02-22 10:18:21 +0300 |
commit | 22424950a3f61d81070fc0edf3773e7c4a4a1184 (patch) | |
tree | 89c4a04acb7ae216d8bd87007430173faade7513 /io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py | |
parent | b629ab427c4ee766bfae52f188287dd8ca767aae (diff) |
glTF exporter: Don't take mute strip into account
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py')
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py | 10 |
1 files changed, 6 insertions, 4 deletions
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 c78c8065..05615053 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py @@ -214,9 +214,10 @@ def __get_blender_actions(blender_object: bpy.types.Object, for track in blender_object.animation_data.nla_tracks: # Multi-strip tracks do not export correctly yet (they need to be baked), # so skip them for now and only write single-strip tracks. - if track.strips is None or len(track.strips) != 1: + non_muted_strips = [strip for strip in track.strips if strip.action is not None and strip.mute is False] + if track.strips is None or len(non_muted_strips) != 1: continue - for strip in [strip for strip in track.strips if strip.action is not None]: + for strip in non_muted_strips: blender_actions.append(strip.action) blender_tracks[strip.action.name] = track.name # Always set after possible active action -> None will be overwrite @@ -233,9 +234,10 @@ def __get_blender_actions(blender_object: bpy.types.Object, for track in blender_object.data.shape_keys.animation_data.nla_tracks: # Multi-strip tracks do not export correctly yet (they need to be baked), # so skip them for now and only write single-strip tracks. - if track.strips is None or len(track.strips) != 1: + non_muted_strips = [strip for strip in track.strips if strip.action is not None and strip.mute is False] + if track.strips is None or len(non_muted_strips) != 1: continue - for strip in track.strips: + for strip in non_muted_strips: blender_actions.append(strip.action) blender_tracks[strip.action.name] = track.name # Always set after possible active action -> None will be overwrite |