diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2019-09-05 00:39:56 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2019-09-05 00:39:56 +0300 |
commit | 9a7d0db875af1ece1f7ed6e10664fddb94f5fb9e (patch) | |
tree | 1db075f3059a169fe1b563fbc3532f0a0afcc3a7 /io_scene_gltf2/blender/imp/gltf2_blender_animation_utils.py | |
parent | 42f1e69458db9efcf61a79ea8ec0ba2bba2b74d9 (diff) |
glTF importer: set track name from gltf animation name
Diffstat (limited to 'io_scene_gltf2/blender/imp/gltf2_blender_animation_utils.py')
-rw-r--r-- | io_scene_gltf2/blender/imp/gltf2_blender_animation_utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 c2ac3bed..888d88a4 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 |