aboutsummaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
authorRémi Verschelde2017-01-15 00:29:04 +0100
committerGitHub2017-01-15 00:29:04 +0100
commitfe8459ac3badc0d2b2b36bf29670d2639825d644 (patch)
tree7fd9694adcce6e512640e6e9544ca69ee50581f8 /tools/editor
parent1d7d8e167474528f32817a1b645b0a10279ae0f0 (diff)
parenta533402695b9a78d1b3feacb68949519dcaa2d8e (diff)
downloadgodot-fe8459ac3badc0d2b2b36bf29670d2639825d644.tar.gz
godot-fe8459ac3badc0d2b2b36bf29670d2639825d644.tar.zst
godot-fe8459ac3badc0d2b2b36bf29670d2639825d644.zip
Merge pull request #7515 from kbake/issue7433
Use Animation's Name as Filename When Saving
Diffstat (limited to 'tools/editor')
-rw-r--r--tools/editor/plugins/animation_player_editor_plugin.cpp7
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 59ab3bc46..a3f254ce4 100644
--- a/tools/editor/plugins/animation_player_editor_plugin.cpp
+++ b/tools/editor/plugins/animation_player_editor_plugin.cpp
@@ -433,7 +433,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);