ResourceImporterScene: Add error when "default" is not defined to create clips

This commit is contained in:
Maverick Liberty 2021-10-01 20:42:49 -04:00 committed by Rémi Verschelde
parent a82347c12a
commit 4b9e12b8c0
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -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;
}