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:
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py')
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py7
1 files changed, 7 insertions, 0 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 6e62507a..2b8a0682 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py
@@ -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