summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-09-29 08:45:38 +0200
committerGitHub <noreply@github.com>2020-09-29 08:45:38 +0200
commit2d14c7cb69769421e96e19f3a8b54de87e8660fc (patch)
tree2736209a40a794c147ae04ec6b78b3d8fd0faf6b /editor
parent4e19e3603b6e3a0ed08b7d6128fa90a6efe24366 (diff)
parent45a1c6f278559fad42d86e3d4a992070c5b14fd2 (diff)
Merge pull request #42125 from andriyDev/inspector_only_option
Added inspector_only option to inspect_object in EditorInterface.
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_plugin.cpp6
-rw-r--r--editor/editor_plugin.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index bce46b719a..082c317655 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -234,8 +234,8 @@ String EditorInterface::get_current_path() const {
return EditorNode::get_singleton()->get_filesystem_dock()->get_current_path();
}
-void EditorInterface::inspect_object(Object *p_obj, const String &p_for_property) {
- EditorNode::get_singleton()->push_item(p_obj, p_for_property);
+void EditorInterface::inspect_object(Object *p_obj, const String &p_for_property, bool p_inspector_only) {
+ EditorNode::get_singleton()->push_item(p_obj, p_for_property, p_inspector_only);
}
EditorFileSystem *EditorInterface::get_resource_file_system() {
@@ -301,7 +301,7 @@ bool EditorInterface::is_distraction_free_mode_enabled() const {
EditorInterface *EditorInterface::singleton = nullptr;
void EditorInterface::_bind_methods() {
- ClassDB::bind_method(D_METHOD("inspect_object", "object", "for_property"), &EditorInterface::inspect_object, DEFVAL(String()));
+ ClassDB::bind_method(D_METHOD("inspect_object", "object", "for_property", "inspector_only"), &EditorInterface::inspect_object, DEFVAL(String()), DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_selection"), &EditorInterface::get_selection);
ClassDB::bind_method(D_METHOD("get_editor_settings"), &EditorInterface::get_editor_settings);
ClassDB::bind_method(D_METHOD("get_script_editor"), &EditorInterface::get_script_editor);
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h
index c7803f73c9..40a91cbfb9 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -89,7 +89,7 @@ public:
String get_selected_path() const;
String get_current_path() const;
- void inspect_object(Object *p_obj, const String &p_for_property = String());
+ void inspect_object(Object *p_obj, const String &p_for_property = String(), bool p_inspector_only = false);
EditorSelection *get_selection();
//EditorImportExport *get_import_export();