diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 468b845b973445ffe35bc46a19311ffc5d94f63b..f06eb439ac06e2b4bb748d045ad3870dce26603e 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": (0, 9, 56), + "version": (0, 9, 57), 'blender': (2, 81, 6), '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 d049afba5ba63da1a53a5abf8f00576336747636..ef88bc37226e0b1e5db68fddf95a0c724bde5159 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_animation_bone.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_animation_bone.py @@ -53,7 +53,8 @@ class BlenderBoneAnim(): start_frame = bpy.context.scene.frame_start - simulate_stash(obj, bpy.data.actions[action_name], start_frame) + animation_name = gltf.data.animations[anim_idx].name + simulate_stash(obj, animation_name, bpy.data.actions[action_name], start_frame) gltf.actions_stashed[(obj.name, action_name)] = True 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 498cbc89b0ed7826a52ea8d840fbd436bb6bedc4..cf570a20343779e8c39d75f002bc8a1be1713a2e 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py @@ -53,7 +53,8 @@ class BlenderNodeAnim(): start_frame = bpy.context.scene.frame_start - simulate_stash(obj, bpy.data.actions[action_name], start_frame) + animation_name = gltf.data.animations[anim_idx].name + simulate_stash(obj, animation_name, bpy.data.actions[action_name], start_frame) gltf.actions_stashed[(obj.name, action_name)] = True diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_animation_utils.py b/io_scene_gltf2/blender/imp/gltf2_blender_animation_utils.py index c2ac3bed38558c743a5495582d711238910f855b..888d88a4942606aa1c15a02c742136ecf076428a 100644 --- a/io_scene_gltf2/blender/imp/gltf2_blender_animation_utils.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_animation_utils.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -def simulate_stash(obj, action, start_frame): +def simulate_stash(obj, gltf_animation_name, action, start_frame): # Simulate stash : # * add a track # * add an action on track @@ -20,7 +20,7 @@ def simulate_stash(obj, action, start_frame): # * remove active action from object tracks = obj.animation_data.nla_tracks new_track = tracks.new(prev=None) - new_track.name = action.name + new_track.name = gltf_animation_name if gltf_animation_name is not None else action.name strip = new_track.strips.new(action.name, start_frame, action) new_track.lock = True new_track.mute = True