aboutsummaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorJuan Linietsky2017-08-20 12:55:46 -0300
committerGitHub2017-08-20 12:55:46 -0300
commit541fdffc0ab2115238fe9cedbf1c088b15f11fdf (patch)
tree187c5d0278e5075907fef8a86b4d00d6a0b7161a /editor
parent831e21e89ba0275b43b6a351e538256b8ce715a3 (diff)
parent90b8a5b71ef79e0339826507c4b290f0c51b7cd2 (diff)
downloadgodot-541fdffc0ab2115238fe9cedbf1c088b15f11fdf.tar.gz
godot-541fdffc0ab2115238fe9cedbf1c088b15f11fdf.tar.zst
godot-541fdffc0ab2115238fe9cedbf1c088b15f11fdf.zip
Merge pull request #10319 from neikeq/pr-engine-editor-hint
Adds Engine::is_editor_hint() method
Diffstat (limited to '')
-rw-r--r--editor/editor_node.cpp3
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp2
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp2
-rw-r--r--editor/project_manager.cpp2
5 files changed, 6 insertions, 5 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index a5f047885..9150e6a9b 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -277,9 +277,10 @@ void EditorNode::_notification(int p_what) {
}
if (p_what == NOTIFICATION_ENTER_TREE) {
+ Engine::get_singleton()->set_editor_hint(true);
+
get_tree()->get_root()->set_disable_3d(true);
//MessageQueue::get_singleton()->push_call(this,"_get_scene_metadata");
- get_tree()->set_editor_hint(true);
get_tree()->get_root()->set_as_audio_listener(false);
get_tree()->get_root()->set_as_audio_listener_2d(false);
get_tree()->set_auto_accept_quit(false);
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index 6e24d4d2c..55975bdef 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -212,7 +212,7 @@ void AnimationTreeEditor::_edit_dialog_animation_changed() {
void AnimationTreeEditor::_edit_dialog_edit_animation() {
- if (get_tree()->is_editor_hint()) {
+ if (Engine::get_singleton()->is_editor_hint()) {
get_tree()->get_root()->get_child(0)->call("_resource_selected", property_editor->get_variant().operator RefPtr());
};
};
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 9e57e53a2..79bf68b06 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -561,7 +561,7 @@ bool CanvasItemEditor::_select_click_on_item(CanvasItem *item, Point2 p_click_po
editor_selection->clear();
editor_selection->add_node(item);
// Reselect
- if (get_tree()->is_editor_hint()) {
+ if (Engine::get_singleton()->is_editor_hint()) {
editor->call("edit_node", item);
}
}
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 41fb27592..bca1f254b 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -2905,7 +2905,7 @@ Object *SpatialEditor::_get_editor_data(Object *p_what) {
si->sbox_instance = VisualServer::get_singleton()->instance_create2(selection_box->get_rid(), sp->get_world()->get_scenario());
VS::get_singleton()->instance_geometry_set_cast_shadows_setting(si->sbox_instance, VS::SHADOW_CASTING_SETTING_OFF);
- if (get_tree()->is_editor_hint())
+ if (Engine::get_singleton()->is_editor_hint())
editor->call("edit_node", sp);
return si;
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 1ea844050..68dfe7e96 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -465,7 +465,7 @@ void ProjectManager::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- get_tree()->set_editor_hint(true);
+ Engine::get_singleton()->set_editor_hint(true);
} else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {