diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/editor/plugins/animation_player_editor_plugin.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp index 3201db1116..a8dc1ad523 100644 --- a/tools/editor/plugins/animation_player_editor_plugin.cpp +++ b/tools/editor/plugins/animation_player_editor_plugin.cpp @@ -431,7 +431,12 @@ void AnimationPlayerEditor::_animation_save_as(const Ref<Resource>& p_resource) String existing; if (extensions.size()) { - existing = "new_" + p_resource->get_class().to_lower() + "." + extensions.front()->get().to_lower(); + if( p_resource->get_name() != "" ) { + existing = p_resource->get_name() + "." + extensions.front()->get().to_lower(); + } + else { + existing = "new_" + p_resource->get_class().to_lower() + "." + extensions.front()->get().to_lower(); + } } file->set_current_path(existing); |