summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-08-30 14:06:28 +0200
committerGitHub <noreply@github.com>2022-08-30 14:06:28 +0200
commit0bf3f7915780f30fab4db323e843b35bf9210548 (patch)
tree14390176bc1ad83f43af8d27684e3f841565ff6e /editor/plugins
parentebe4f8d3a4a706c5eb1b7a8283883c63c131cad7 (diff)
parentd4555ef5fbf706c43faccf5fdb3f023696197727 (diff)
Merge pull request #63902 from dalexeev/string-cases
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/bone_map_editor_plugin.cpp2
-rw-r--r--editor/plugins/script_text_editor.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/bone_map_editor_plugin.cpp b/editor/plugins/bone_map_editor_plugin.cpp
index c16dca00a3..988f9cc394 100644
--- a/editor/plugins/bone_map_editor_plugin.cpp
+++ b/editor/plugins/bone_map_editor_plugin.cpp
@@ -609,7 +609,7 @@ int BoneMapper::search_bone_by_name(Skeleton3D *p_skeleton, Vector<String> p_pic
}
BoneMapper::BoneSegregation BoneMapper::guess_bone_segregation(String p_bone_name) {
- String fixed_bn = p_bone_name.camelcase_to_underscore().to_lower();
+ String fixed_bn = p_bone_name.to_snake_case();
LocalVector<String> left_words;
left_words.push_back("(?<![a-zA-Z])left");
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 85e53011d6..8bb9452938 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1590,7 +1590,7 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
}
}
- String variable_name = String(node->get_name()).camelcase_to_underscore(true).validate_identifier();
+ String variable_name = String(node->get_name()).to_snake_case().validate_identifier();
if (use_type) {
text_to_drop += vformat("@onready var %s: %s = %s%s\n", variable_name, node->get_class_name(), is_unique ? "%" : "$", path);
} else {