glTF exporter: Don't take mute strip into account
This commit is contained in:
parent
b629ab427c
commit
22424950a3
|
@ -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, 2, 23),
|
||||
"version": (1, 2, 24),
|
||||
'blender': (2, 82, 7),
|
||||
'location': 'File > Import-Export',
|
||||
'description': 'Import-Export as glTF 2.0',
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue