From a533402695b9a78d1b3feacb68949519dcaa2d8e Mon Sep 17 00:00:00 2001 From: kbake Date: Sat, 14 Jan 2017 14:45:42 -0500 Subject: [PATCH] Will now try to use the existing animation's name for filename, defaults to previous value in case there's no name --- tools/editor/plugins/animation_player_editor_plugin.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp index 3201db1116f..a8dc1ad5231 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& 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);