diff options
author | kbake <kbake@outlook.com> | 2017-01-14 14:45:42 -0500 |
---|---|---|
committer | kbake <kbake@outlook.com> | 2017-01-14 14:45:42 -0500 |
commit | a533402695b9a78d1b3feacb68949519dcaa2d8e (patch) | |
tree | b55065698acc278f4e82e847371e642c2c838339 /tools/editor/plugins | |
parent | a2903fc51d1d20eba4dc451bdacbe477d6670163 (diff) |
Will now try to use the existing animation's name for filename, defaults to previous value in case there's no name
Diffstat (limited to 'tools/editor/plugins')
-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); |