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>2022-04-22 22:19:26 +0300
committerJulien Duroure <julien.duroure@gmail.com>2022-04-22 22:19:26 +0300
commit6e430d2317889fcc9a256b3908ec05a95a03ac5c (patch)
tree8e3bf6ddc1af8d35c465dcfb771dceec4cf00e53
parentadf10c631570801e5434b29b1cc5f691d37db6da (diff)
glTF exporter: manage use_nla option to avoid exporting merged animations
-rwxr-xr-xio_scene_gltf2/__init__.py2
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_animations.py7
2 files changed, 8 insertions, 1 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index c57370e2..7b60678d 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -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',
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