From 95cd74fc4b8950cc3623961078981a4a147aec02 Mon Sep 17 00:00:00 2001 From: Sl3dge78 <45926471+Sl3dge78@users.noreply.github.com> Date: Thu, 18 Jun 2020 23:12:22 +0200 Subject: [PATCH] Fix #20467. The "Anim imported" warning gets displayed properly when working on imported anims. --- editor/import/editor_scene_importer_gltf.cpp | 1 + editor/import/resource_importer_scene.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index 1a232658febb..683db0e31d60 100644 --- a/editor/import/editor_scene_importer_gltf.cpp +++ b/editor/import/editor_scene_importer_gltf.cpp @@ -2877,6 +2877,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); diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index ec82f78e7530..65ebf9dc4f71 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -943,9 +943,9 @@ void ResourceImporterScene::_make_external_resources(Node *p_node, const String ERR_CONTINUE(anim.is_null()); 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;