summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-07-30 15:44:29 +0200
committerGitHub <noreply@github.com>2021-07-30 15:44:29 +0200
commit92c5c46da7e5990ac328437ffea6ec3fcd8a0f10 (patch)
tree7c720740253c131943a6a3a827313711882946d5 /editor/plugins
parenta1c19b9a1e53f78c75c13cb418270db80057b21a (diff)
parentae7a74625d7a6a27285508657a128fb157581412 (diff)
Merge pull request #51041 from foxydevloper/new-resources-snake-case
Name new resource files with `snake_case`
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 4ba9147955..681c3e7195 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -408,7 +408,8 @@ void AnimationPlayerEditor::_animation_save_as(const Ref<Resource> &p_resource)
if (p_resource->get_name() != "") {
path = p_resource->get_name() + "." + extensions.front()->get().to_lower();
} else {
- path = "new_" + p_resource->get_class().to_lower() + "." + extensions.front()->get().to_lower();
+ String resource_name_snake_case = p_resource->get_class().camelcase_to_underscore();
+ path = "new_" + resource_name_snake_case + "." + extensions.front()->get().to_lower();
}
}
}