Add EditorInspector getter. Update Sub-Inspectors.
This commit is contained in:
parent
6d86450a83
commit
c1b247e4d5
|
@ -240,6 +240,10 @@ bool EditorInterface::is_plugin_enabled(const String &p_plugin) const {
|
||||||
return EditorNode::get_singleton()->is_addon_plugin_enabled(p_plugin);
|
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() {
|
Error EditorInterface::save_scene() {
|
||||||
if (!get_edited_scene_root())
|
if (!get_edited_scene_root())
|
||||||
return ERR_CANT_CREATE;
|
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("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("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"), &EditorInterface::save_scene);
|
||||||
ClassDB::bind_method(D_METHOD("save_scene_as", "path", "with_preview"), &EditorInterface::save_scene_as, DEFVAL(true));
|
ClassDB::bind_method(D_METHOD("save_scene_as", "path", "with_preview"), &EditorInterface::save_scene_as, DEFVAL(true));
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,6 +95,8 @@ public:
|
||||||
void set_plugin_enabled(const String &p_plugin, bool p_enabled);
|
void set_plugin_enabled(const String &p_plugin, bool p_enabled);
|
||||||
bool is_plugin_enabled(const String &p_plugin) const;
|
bool is_plugin_enabled(const String &p_plugin) const;
|
||||||
|
|
||||||
|
EditorInspector *get_inspector() const;
|
||||||
|
|
||||||
Error save_scene();
|
Error save_scene();
|
||||||
void save_scene_as(const String &p_scene, bool p_with_preview = true);
|
void save_scene_as(const String &p_scene, bool p_with_preview = true);
|
||||||
|
|
||||||
|
|
|
@ -2540,6 +2540,7 @@ void EditorPropertyResource::update_property() {
|
||||||
sub_inspector->edit(res.ptr());
|
sub_inspector->edit(res.ptr());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub_inspector->refresh();
|
||||||
} else {
|
} else {
|
||||||
if (sub_inspector) {
|
if (sub_inspector) {
|
||||||
set_bottom_editor(NULL);
|
set_bottom_editor(NULL);
|
||||||
|
|
Loading…
Reference in New Issue