[Bf-extensions-cvs] [9920e00e] master: glTF: fix re-exporting mutltiple animations (regression)

Julien Duroure noreply at git.blender.org
Sun Feb 23 19:25:42 CET 2020


Commit: 9920e00e5fbeee555ce0bef48b86ce4994a443f1
Author: Julien Duroure
Date:   Sun Feb 23 19:22:42 2020 +0100
Branches: master
https://developer.blender.org/rBA9920e00e5fbeee555ce0bef48b86ce4994a443f1

glTF: fix re-exporting mutltiple animations (regression)

===================================================================

M	io_scene_gltf2/__init__.py
M	io_scene_gltf2/blender/imp/gltf2_blender_animation_bone.py
M	io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py

===================================================================

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index df658cad..668c3adc 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -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, 30),
+    "version": (1, 2, 31),
     'blender': (2, 82, 7),
     'location': 'File > Import-Export',
     'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_animation_bone.py b/io_scene_gltf2/blender/imp/gltf2_blender_animation_bone.py
index 4d834611..62c179c1 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_animation_bone.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_animation_bone.py
@@ -178,6 +178,7 @@ class BlenderBoneAnim():
         if not action:
             name = animation.track_name + "_" + obj.name
             action = bpy.data.actions.new(name)
+            action.id_root = 'OBJECT'
             gltf.needs_stash.append((obj, animation.track_name, action))
             gltf.action_cache[obj.name] = action
 
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py b/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py
index 47f76c99..a0205483 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py
@@ -49,6 +49,7 @@ class BlenderNodeAnim():
         if not action:
             name = animation.track_name + "_" + obj.name
             action = bpy.data.actions.new(name)
+            action.id_root = 'OBJECT'
             gltf.needs_stash.append((obj, animation.track_name, action))
             gltf.action_cache[obj.name] = action



More information about the Bf-extensions-cvs mailing list