From b6f04dfd219ff476a69804f9440f0d10e1d0e515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Tue, 5 Oct 2021 22:10:12 +0200 Subject: [PATCH] Add ProjectSettings::set_hide_from_editor() --- core/project_settings.cpp | 5 +++++ core/project_settings.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/core/project_settings.cpp b/core/project_settings.cpp index 08e8574c0e2..3e49f47a68f 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -127,6 +127,11 @@ void ProjectSettings::set_restart_if_changed(const String &p_name, bool p_restar props[p_name].restart_if_changed = p_restart; } +void ProjectSettings::set_hide_from_editor(const String &p_name, bool p_hide_from_editor) { + ERR_FAIL_COND_MSG(!props.has(p_name), "Request for nonexistent project setting: " + p_name + "."); + props[p_name].hide_from_editor = p_hide_from_editor; +} + void ProjectSettings::set_ignore_value_in_docs(const String &p_name, bool p_ignore) { ERR_FAIL_COND_MSG(!props.has(p_name), "Request for nonexistent project setting: " + p_name + "."); #ifdef DEBUG_METHODS_ENABLED diff --git a/core/project_settings.h b/core/project_settings.h index 7a10a8979ce..2427de94441 100644 --- a/core/project_settings.h +++ b/core/project_settings.h @@ -131,9 +131,9 @@ public: void set_initial_value(const String &p_name, const Variant &p_value); void set_restart_if_changed(const String &p_name, bool p_restart); + void set_hide_from_editor(const String &p_name, bool p_hide_from_editor); void set_ignore_value_in_docs(const String &p_name, bool p_ignore); bool get_ignore_value_in_docs(const String &p_name) const; - bool property_can_revert(const String &p_name); Variant property_get_revert(const String &p_name);