diff options
author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2017-08-19 01:02:56 +0200 |
---|---|---|
committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2017-08-19 01:29:45 +0200 |
commit | 90b8a5b71ef79e0339826507c4b290f0c51b7cd2 (patch) | |
tree | 6f24bbc63ef9674687589f9ec9017e9fd09d266e /modules | |
parent | fd69604bd9dc743494a7818f25f384cc7f521b33 (diff) |
Removes editor_hint from SceneTree
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdnative/gdnative.cpp | 4 | ||||
-rw-r--r-- | modules/gdscript/gd_editor.cpp | 3 | ||||
-rw-r--r-- | modules/visual_script/visual_script.cpp | 2 | ||||
-rw-r--r-- | modules/visual_script/visual_script_func_nodes.cpp | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp index 440cc45479..fc4fc5c10d 100644 --- a/modules/gdnative/gdnative.cpp +++ b/modules/gdnative/gdnative.cpp @@ -229,7 +229,7 @@ bool GDNative::initialize() { godot_gdnative_init_options options; - options.in_editor = SceneTree::get_singleton()->is_editor_hint(); + options.in_editor = Engine::get_singleton()->is_editor_hint(); options.core_api_hash = ClassDB::get_api_hash(ClassDB::API_CORE); options.editor_api_hash = ClassDB::get_api_hash(ClassDB::API_EDITOR); options.no_api_hash = ClassDB::get_api_hash(ClassDB::API_NONE); @@ -265,7 +265,7 @@ bool GDNative::terminate() { // TODO(karroffel): remove this? Should be part of NativeScript, not // GDNative IMO godot_gdnative_terminate_options options; - options.in_editor = SceneTree::get_singleton()->is_editor_hint(); + options.in_editor = Engine::get_singleton()->is_editor_hint(); library_terminate_pointer(&options); diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index f8b45af85a..3fa0a38024 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -35,6 +35,7 @@ #ifdef TOOLS_ENABLED #include "editor/editor_file_system.h" #include "editor/editor_settings.h" +#include "engine.h" #endif void GDScriptLanguage::get_comment_delimiters(List<String> *p_delimiters) const { @@ -2371,7 +2372,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base String GDScriptLanguage::_get_indentation() const { #ifdef TOOLS_ENABLED - if (SceneTree::get_singleton()->is_editor_hint()) { + if (Engine::get_singleton()->is_editor_hint()) { bool use_space_indentation = EDITOR_DEF("text_editor/indent/type", 0); if (use_space_indentation) { diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index d1cf0f1dce..fd4ae9fc5a 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -273,7 +273,7 @@ void VisualScript::_node_ports_changed(int p_id) { Function &func = functions[function]; Ref<VisualScriptNode> vsn = func.nodes[p_id].node; - if (OS::get_singleton()->get_main_loop() && OS::get_singleton()->get_main_loop()->cast_to<SceneTree>() && OS::get_singleton()->get_main_loop()->cast_to<SceneTree>()->is_editor_hint()) { + if (OS::get_singleton()->get_main_loop() && OS::get_singleton()->get_main_loop()->cast_to<SceneTree>() && Engine::get_singleton()->is_editor_hint()) { vsn->validate_input_default_values(); //force validate default values when editing on editor } diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp index 3c057cdbd5..7992a4e803 100644 --- a/modules/visual_script/visual_script_func_nodes.cpp +++ b/modules/visual_script/visual_script_func_nodes.cpp @@ -1164,7 +1164,7 @@ void VisualScriptPropertySet::_update_cache() { if (!OS::get_singleton()->get_main_loop()->cast_to<SceneTree>()) return; - if (!OS::get_singleton()->get_main_loop()->cast_to<SceneTree>()->is_editor_hint()) //only update cache if editor exists, it's pointless otherwise + if (!Engine::get_singleton()->is_editor_hint()) //only update cache if editor exists, it's pointless otherwise return; if (call_mode == CALL_MODE_BASIC_TYPE) { |