From 8dca093d97713923f5ae37e68df82b82e60e15b2 Mon Sep 17 00:00:00 2001 From: Ninni Pipping Date: Thu, 9 Mar 2023 19:07:47 +0100 Subject: [PATCH] Document `editor/naming/scene_name_casing` setting Moved definitions of editor related project settings to `editor/register_editor_types.cpp` to make documentation work. (cherry picked from commit 3de5332fcb31ea46a692fda7b92847b162e3571d) --- core/config/project_settings.cpp | 8 -------- doc/classes/ProjectSettings.xml | 3 +++ editor/editor_node.cpp | 1 - editor/register_editor_types.cpp | 9 +++++++++ 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index 56e9057a2a8..933b9891cc2 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -1304,16 +1304,8 @@ ProjectSettings::ProjectSettings() { } extensions.push_back("gdshader"); - GLOBAL_DEF("editor/run/main_run_args", ""); - GLOBAL_DEF(PropertyInfo(Variant::PACKED_STRING_ARRAY, "editor/script/search_in_file_extensions"), extensions); - GLOBAL_DEF(PropertyInfo(Variant::STRING, "editor/script/templates_search_path", PROPERTY_HINT_DIR), "res://script_templates"); - - // For correct doc generation. - GLOBAL_DEF("editor/naming/default_signal_callback_name", "_on_{node_name}_{signal_name}"); - GLOBAL_DEF("editor/naming/default_signal_callback_to_self_name", "_on_{signal_name}"); - _add_builtin_input_map(); // Keep the enum values in sync with the `DisplayServer::ScreenOrientation` enum. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index b321a1f8217..27bec07cba8 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -753,6 +753,9 @@ What to use to separate node name from number. This is mostly an editor setting. + + When generating file names from scene root node, set the type of casing in this project. This is mostly an editor setting. + The command-line arguments to append to Godot's own command line when running the project. This doesn't affect the editor itself. It is possible to make another executable run Godot by using the [code]%command%[/code] placeholder. The placeholder will be replaced with Godot's own command line. Program-specific arguments should be placed [i]before[/i] the placeholder, whereas Godot-specific arguments should be placed [i]after[/i] the placeholder. diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 2834a086b86..6c521afd142 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -6509,7 +6509,6 @@ void EditorNode::_feature_profile_changed() { } void EditorNode::_bind_methods() { - GLOBAL_DEF(PropertyInfo(Variant::INT, "editor/naming/scene_name_casing", PROPERTY_HINT_ENUM, "Auto,PascalCase,snake_case"), SCENE_NAME_CASING_SNAKE_CASE); ClassDB::bind_method("edit_current", &EditorNode::edit_current); ClassDB::bind_method("edit_node", &EditorNode::edit_node); diff --git a/editor/register_editor_types.cpp b/editor/register_editor_types.cpp index 061baaff7ee..d9138128cde 100644 --- a/editor/register_editor_types.cpp +++ b/editor/register_editor_types.cpp @@ -212,6 +212,15 @@ void register_editor_types() { EditorPlugins::add_by_type(); EditorPlugins::add_by_type(); EditorPlugins::add_by_type(); + + // For correct doc generation. + GLOBAL_DEF("editor/run/main_run_args", ""); + + GLOBAL_DEF(PropertyInfo(Variant::STRING, "editor/script/templates_search_path", PROPERTY_HINT_DIR), "res://script_templates"); + + GLOBAL_DEF("editor/naming/default_signal_callback_name", "_on_{node_name}_{signal_name}"); + GLOBAL_DEF("editor/naming/default_signal_callback_to_self_name", "_on_{signal_name}"); + GLOBAL_DEF(PropertyInfo(Variant::INT, "editor/naming/scene_name_casing", PROPERTY_HINT_ENUM, "Auto,PascalCase,snake_case"), EditorNode::SCENE_NAME_CASING_SNAKE_CASE); } void unregister_editor_types() {