summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-04-05 16:41:02 +0200
committerGitHub <noreply@github.com>2019-04-05 16:41:02 +0200
commitfc081ebe103f9e68c20f944934c6edb78ea20354 (patch)
tree206f094e1a0a25fe302ddb3f1849007374cbf8f6 /editor
parent945f7f83d32ca57e35c9e348da162714ef8a503b (diff)
parentc1b247e4d5c0215a062df0550dd41641915d8569 (diff)
Merge pull request #26954 from willnationsdev/refresh
Add a getter for the EditorInspector
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_plugin.cpp6
-rw-r--r--editor/editor_plugin.h2
-rw-r--r--editor/editor_properties.cpp1
3 files changed, 9 insertions, 0 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index c2493729a3..8af4ee8017 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -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));
}
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h
index 3e41bb5612..2fcc487377 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -95,6 +95,8 @@ public:
void set_plugin_enabled(const String &p_plugin, bool p_enabled);
bool is_plugin_enabled(const String &p_plugin) const;
+ EditorInspector *get_inspector() const;
+
Error save_scene();
void save_scene_as(const String &p_scene, bool p_with_preview = true);
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 2d0d212af9..c13a4a5a5e 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -2542,6 +2542,7 @@ void EditorPropertyResource::update_property() {
sub_inspector->edit(res.ptr());
}
+ sub_inspector->refresh();
} else {
if (sub_inspector) {
set_bottom_editor(NULL);