diff options
Diffstat (limited to 'scene/main/node.cpp')
-rw-r--r-- | scene/main/node.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/scene/main/node.cpp b/scene/main/node.cpp index cc3d14e5be..289e963077 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -951,14 +951,11 @@ String Node::validate_child_name(Node *p_child) { String Node::adjust_name_casing(const String &p_name) { switch (GLOBAL_GET("editor/node_naming/name_casing").operator int()) { case NAME_CASING_PASCAL_CASE: - return p_name.capitalize().replace(" ", ""); - case NAME_CASING_CAMEL_CASE: { - String name = p_name.capitalize().replace(" ", ""); - name[0] = name.to_lower()[0]; - return name; - } + return p_name.to_pascal_case(); + case NAME_CASING_CAMEL_CASE: + return p_name.to_camel_case(); case NAME_CASING_SNAKE_CASE: - return p_name.capitalize().replace(" ", "_").to_lower(); + return p_name.to_snake_case(); } return p_name; } @@ -2926,7 +2923,7 @@ void Node::_bind_methods() { BIND_CONSTANT(NOTIFICATION_PROCESS); BIND_CONSTANT(NOTIFICATION_PARENTED); BIND_CONSTANT(NOTIFICATION_UNPARENTED); - BIND_CONSTANT(NOTIFICATION_INSTANCED); + BIND_CONSTANT(NOTIFICATION_SCENE_INSTANTIATED); BIND_CONSTANT(NOTIFICATION_DRAG_BEGIN); BIND_CONSTANT(NOTIFICATION_DRAG_END); BIND_CONSTANT(NOTIFICATION_PATH_RENAMED); |