1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-04 17:04:49 +00:00

Add EditorInspector getter. Update Sub-Inspectors.

(cherry picked from commit c1b247e4d5)
This commit is contained in:
Will Nations
2019-03-12 01:43:48 -05:00
committed by Rémi Verschelde
parent 0f51f138b5
commit 0e7de28b8d
3 changed files with 9 additions and 0 deletions

View File

@@ -240,6 +240,10 @@ bool EditorInterface::is_plugin_enabled(const String &p_plugin) const {
return EditorNode::get_singleton()->is_addon_plugin_enabled(p_plugin);
}
EditorInspector *EditorInterface::get_inspector() const {
return EditorNode::get_singleton()->get_inspector();
}
Error EditorInterface::save_scene() {
if (!get_edited_scene_root())
return ERR_CANT_CREATE;
@@ -279,6 +283,8 @@ void EditorInterface::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_plugin_enabled", "plugin", "enabled"), &EditorInterface::set_plugin_enabled);
ClassDB::bind_method(D_METHOD("is_plugin_enabled", "plugin"), &EditorInterface::is_plugin_enabled);
ClassDB::bind_method(D_METHOD("get_inspector"), &EditorInterface::get_inspector);
ClassDB::bind_method(D_METHOD("save_scene"), &EditorInterface::save_scene);
ClassDB::bind_method(D_METHOD("save_scene_as", "path", "with_preview"), &EditorInterface::save_scene_as, DEFVAL(true));
}