|
52 | 52 | #include "editor/settings/editor_command_palette.h" |
53 | 53 | #include "editor/settings/editor_feature_profile.h" |
54 | 54 | #include "editor/settings/editor_settings.h" |
| 55 | +#include "editor/settings/project_settings_editor.h" |
55 | 56 | #include "editor/themes/editor_scale.h" |
56 | 57 | #include "main/main.h" |
57 | 58 | #include "scene/3d/light_3d.h" |
@@ -105,6 +106,17 @@ EditorUndoRedoManager *EditorInterface::get_editor_undo_redo() const { |
105 | 106 | return EditorUndoRedoManager::get_singleton(); |
106 | 107 | } |
107 | 108 |
|
| 109 | +void EditorInterface::open_project_settings(const String &p_general_page, const String &p_filter) { |
| 110 | + ProjectSettingsEditor *project_settings = EditorNode::get_singleton()->get_project_settings(); |
| 111 | + project_settings->set_general_page(p_general_page); |
| 112 | + project_settings->set_filter(p_filter); |
| 113 | + project_settings->popup_project_settings(false); |
| 114 | +} |
| 115 | + |
| 116 | +void EditorInterface::open_export_dialog() { |
| 117 | + EditorNode::get_singleton()->open_export_dialog(); |
| 118 | +} |
| 119 | + |
108 | 120 | AABB EditorInterface::_calculate_aabb_for_scene(Node *p_node, AABB &p_scene_aabb) { |
109 | 121 | MeshInstance3D *mesh_node = Object::cast_to<MeshInstance3D>(p_node); |
110 | 122 | if (mesh_node && mesh_node->get_mesh().is_valid()) { |
@@ -830,6 +842,9 @@ void EditorInterface::_bind_methods() { |
830 | 842 | ClassDB::bind_method(D_METHOD("get_editor_toaster"), &EditorInterface::get_editor_toaster); |
831 | 843 | ClassDB::bind_method(D_METHOD("get_editor_undo_redo"), &EditorInterface::get_editor_undo_redo); |
832 | 844 |
|
| 845 | + ClassDB::bind_method(D_METHOD("open_project_settings", "general_page", "filter"), &EditorInterface::open_project_settings); |
| 846 | + ClassDB::bind_method(D_METHOD("open_export_dialog"), &EditorInterface::open_export_dialog); |
| 847 | + |
833 | 848 | ClassDB::bind_method(D_METHOD("make_mesh_previews", "meshes", "preview_size"), &EditorInterface::_make_mesh_previews); |
834 | 849 |
|
835 | 850 | ClassDB::bind_method(D_METHOD("set_plugin_enabled", "plugin", "enabled"), &EditorInterface::set_plugin_enabled); |
|
0 commit comments