Skip to content

Commit

Permalink
Fix #20467. The "Anim imported" warning gets displayed properly when …
Browse files Browse the repository at this point in the history
…working on imported anims.

(cherry picked from commit 95cd74f)
  • Loading branch information
Sl3dge78 authored and akien-mga committed Jun 21, 2020
1 parent d080c0d commit d99f6c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions editor/import/editor_scene_importer_gltf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2910,6 +2910,7 @@ void EditorSceneImporterGLTF::_import_animation(GLTFState &state, AnimationPlaye
int track_idx = animation->get_track_count();
animation->add_track(Animation::TYPE_TRANSFORM);
animation->track_set_path(track_idx, node_path);
animation->track_set_imported(track_idx, true);
//first determine animation length

const float increment = 1.0 / float(bake_fps);
Expand Down
4 changes: 2 additions & 2 deletions editor/import/resource_importer_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -974,9 +974,9 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String

if (!p_animations.has(anim)) {

//mark what comes from the file first, this helps eventually keep user data
// We are making external files so they are modifiable
for (int i = 0; i < anim->get_track_count(); i++) {
anim->track_set_imported(i, true);
anim->track_set_imported(i, false);
}

String ext_name;
Expand Down

0 comments on commit d99f6c4

Please sign in to comment.