diff options
author | Geequlim <geequlim@gmail.com> | 2017-11-16 17:18:36 +0800 |
---|---|---|
committer | Geequlim <geequlim@gmail.com> | 2017-11-17 12:01:54 +0800 |
commit | fab66af7e99eb71ea6a2df30bea46835f749896a (patch) | |
tree | bfd8b19219ba48ca311d47f2914b7b474ce95195 /modules/gdscript | |
parent | c655fc7cd89d17eb858b3c99e82402de61571bb0 (diff) |
Move the remote scene tree to the scene tree dock.
Ignore all script constants in the global section of the breakpoint stack.
Check property size before send to avoid too large of data be sent.
Fix crash while clear the remote objects from the debugger.
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index de7adc7e4a..5a76acea6e 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -33,7 +33,7 @@ #include "gdscript_compiler.h" #include "global_constants.h" #include "os/file_access.h" -#include "project_settings.h" +#include "core/engine.h" #ifdef TOOLS_ENABLED #include "editor/editor_file_system.h" @@ -287,7 +287,7 @@ ScriptInstance *GDScriptLanguage::debug_get_stack_level_instance(int p_level) { ERR_FAIL_INDEX_V(p_level, _debug_call_stack_pos, NULL); int l = _debug_call_stack_pos - p_level - 1; - GDInstance *instance = _call_stack[l].instance; + ScriptInstance *instance = _call_stack[l].instance; return instance; } @@ -297,14 +297,27 @@ void GDScriptLanguage::debug_get_globals(List<String> *p_globals, List<Variant> const Map<StringName, int> &name_idx = GDScriptLanguage::get_singleton()->get_global_map(); const Variant *globals = GDScriptLanguage::get_singleton()->get_global_array(); + List<Pair<String, Variant> > cinfo; + get_public_constants(&cinfo); + for (const Map<StringName, int>::Element *E = name_idx.front(); E; E = E->next()) { - if (ClassDB::class_exists(E->key()) || ProjectSettings::get_singleton()->has_singleton(E->key()) || E->key() == "PI" || E->key() == "INF" || E->key() == "NAN") + if (ClassDB::class_exists(E->key()) || Engine::get_singleton()->has_singleton(E->key())) + continue; + + bool is_script_constant = false; + for (List<Pair<String, Variant> >::Element *CE = cinfo.front(); CE; CE = CE->next()) { + if (CE->get().first == E->key()) { + is_script_constant = true; + break; + } + } + if (is_script_constant) continue; const Variant &var = globals[E->value()]; if (Object *obj = var) { - if (Object::cast_to<GDNativeClass>(obj)) + if (Object::cast_to<GDScriptNativeClass>(obj)) continue; } |