summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaverick Liberty <xMakerx@users.noreply.github.com>2021-10-01 20:42:49 -0400
committerRĂ©mi Verschelde <rverschelde@gmail.com>2021-10-18 11:49:46 +0200
commit4b9e12b8c0bd53f4f3ed66b475d49e0c5a294d37 (patch)
treefb36f886a1a60cfd5b2e3976fdada2456387c806
parenta82347c12af869cb1f87ade5925222362720f28a (diff)
ResourceImporterScene: Add error when "default" is not defined to create clips
-rw-r--r--editor/import/resource_importer_scene.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index 319e5ee25f..fe3c050283 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -988,6 +988,7 @@ Ref<Animation> ResourceImporterScene::_save_animation_to_file(Ref<Animation> ani
void ResourceImporterScene::_create_clips(AnimationPlayer *anim, const Array &p_clips, bool p_bake_all) {
if (!anim->has_animation("default")) {
+ ERR_FAIL_COND_MSG(p_clips.size() > 0, "To create clips, animations must be named \"default\".");
return;
}