glTF exporter: manage use_nla option to avoid exporting merged animations
This commit is contained in:
parent
adf10c6315
commit
6e430d2317
|
@ -4,7 +4,7 @@
|
|||
bl_info = {
|
||||
'name': 'glTF 2.0 format',
|
||||
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
|
||||
"version": (3, 2, 29),
|
||||
"version": (3, 2, 30),
|
||||
'blender': (3, 1, 0),
|
||||
'location': 'File > Import-Export',
|
||||
'description': 'Import-Export as glTF 2.0',
|
||||
|
|
|
@ -100,6 +100,11 @@ def gather_animations( obj_uuid: int,
|
|||
if blender_object.animation_data:
|
||||
restore_tweak_mode = blender_object.animation_data.use_tweak_mode
|
||||
|
||||
# Remove use of NLA. Restore after export
|
||||
if blender_object.animation_data:
|
||||
current_use_nla = blender_object.animation_data.use_nla
|
||||
blender_object.animation_data.use_nla = False
|
||||
|
||||
# Export all collected actions.
|
||||
for blender_action, track_name, on_type in blender_actions:
|
||||
|
||||
|
@ -143,6 +148,8 @@ def gather_animations( obj_uuid: int,
|
|||
if solo_track is not None:
|
||||
solo_track.is_solo = True
|
||||
blender_object.animation_data.use_tweak_mode = restore_tweak_mode
|
||||
blender_object.animation_data.use_nla = current_use_nla
|
||||
|
||||
return animations, tracks
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue