diff options
Diffstat (limited to 'editor/editor_settings.cpp')
-rw-r--r-- | editor/editor_settings.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index fe0392334c..a47605be15 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -1151,7 +1151,7 @@ void EditorSettings::set_project_metadata(const String &p_section, const String cf->save(path); } -Variant EditorSettings::get_project_metadata(const String &p_section, const String &p_key, Variant p_default) { +Variant EditorSettings::get_project_metadata(const String &p_section, const String &p_key, Variant p_default) const { Ref<ConfigFile> cf = memnew(ConfigFile); String path = get_project_settings_dir().plus_file("project_metadata.cfg"); Error err = cf->load(path); @@ -1493,6 +1493,9 @@ void EditorSettings::_bind_methods() { ClassDB::bind_method(D_METHOD("get_settings_dir"), &EditorSettings::get_settings_dir); ClassDB::bind_method(D_METHOD("get_project_settings_dir"), &EditorSettings::get_project_settings_dir); + ClassDB::bind_method(D_METHOD("set_project_metadata", "section", "key", "data"), &EditorSettings::set_project_metadata); + ClassDB::bind_method(D_METHOD("get_project_metadata", "section", "key", "default"), &EditorSettings::get_project_metadata, DEFVAL(Variant())); + ClassDB::bind_method(D_METHOD("set_favorite_dirs", "dirs"), &EditorSettings::set_favorite_dirs); ClassDB::bind_method(D_METHOD("get_favorite_dirs"), &EditorSettings::get_favorite_dirs); ClassDB::bind_method(D_METHOD("set_recent_dirs", "dirs"), &EditorSettings::set_recent_dirs); |