diff options
53 files changed, 198 insertions, 122 deletions
diff --git a/core/debugger/engine_profiler.h b/core/debugger/engine_profiler.h index f74481c84b..d3d0021e67 100644 --- a/core/debugger/engine_profiler.h +++ b/core/debugger/engine_profiler.h @@ -31,10 +31,8 @@ #ifndef ENGINE_PROFILER_H #define ENGINE_PROFILER_H -#include "core/object/ref_counted.h" - #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" +#include "core/object/ref_counted.h" class EngineProfiler : public RefCounted { GDCLASS(EngineProfiler, RefCounted); diff --git a/core/io/packet_peer.h b/core/io/packet_peer.h index 7383ab84df..86ebe32cb6 100644 --- a/core/io/packet_peer.h +++ b/core/io/packet_peer.h @@ -37,7 +37,6 @@ #include "core/extension/ext_wrappers.gen.inc" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" #include "core/variant/native_ptr.h" class PacketPeer : public RefCounted { diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 551d3268b8..ea97e5ecce 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -36,6 +36,7 @@ #include "core/io/image.h" #include "core/io/marshalls.h" #include "core/io/missing_resource.h" +#include "core/object/script_language.h" #include "core/version.h" //#define print_bl(m_what) print_line(m_what) diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index df0253349c..c1a38f0af8 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -33,6 +33,7 @@ #include "core/config/project_settings.h" #include "core/io/file_access.h" #include "core/io/resource_importer.h" +#include "core/object/script_language.h" #include "core/os/condition_variable.h" #include "core/os/os.h" #include "core/string/print_string.h" diff --git a/core/io/resource_loader.h b/core/io/resource_loader.h index 2701caa3f4..0c7d6c0feb 100644 --- a/core/io/resource_loader.h +++ b/core/io/resource_loader.h @@ -33,7 +33,6 @@ #include "core/io/resource.h" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" #include "core/object/worker_thread_pool.h" #include "core/os/semaphore.h" #include "core/os/thread.h" diff --git a/core/io/resource_saver.h b/core/io/resource_saver.h index 572742d129..4828df297a 100644 --- a/core/io/resource_saver.h +++ b/core/io/resource_saver.h @@ -33,7 +33,6 @@ #include "core/io/resource.h" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" class ResourceFormatSaver : public RefCounted { GDCLASS(ResourceFormatSaver, RefCounted); diff --git a/core/io/stream_peer.h b/core/io/stream_peer.h index ba11144e33..29cdb82615 100644 --- a/core/io/stream_peer.h +++ b/core/io/stream_peer.h @@ -35,7 +35,6 @@ #include "core/extension/ext_wrappers.gen.inc" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" #include "core/variant/native_ptr.h" class StreamPeer : public RefCounted { diff --git a/core/math/a_star.h b/core/math/a_star.h index fc4bb09f03..0758500c8a 100644 --- a/core/math/a_star.h +++ b/core/math/a_star.h @@ -33,7 +33,6 @@ #include "core/object/gdvirtual.gen.inc" #include "core/object/ref_counted.h" -#include "core/object/script_language.h" #include "core/templates/oa_hash_map.h" /** diff --git a/core/math/a_star_grid_2d.h b/core/math/a_star_grid_2d.h index dd5f9d0575..ecc9bb01f9 100644 --- a/core/math/a_star_grid_2d.h +++ b/core/math/a_star_grid_2d.h @@ -33,7 +33,6 @@ #include "core/object/gdvirtual.gen.inc" #include "core/object/ref_counted.h" -#include "core/object/script_language.h" #include "core/templates/list.h" #include "core/templates/local_vector.h" diff --git a/core/object/make_virtuals.py b/core/object/make_virtuals.py index 5be9650b32..38682d6d92 100644 --- a/core/object/make_virtuals.py +++ b/core/object/make_virtuals.py @@ -160,6 +160,8 @@ def run(target, source, env): #ifndef GDVIRTUAL_GEN_H #define GDVIRTUAL_GEN_H +#include "core/object/script_instance.h" + """ diff --git a/core/object/script_instance.cpp b/core/object/script_instance.cpp new file mode 100644 index 0000000000..303b127db1 --- /dev/null +++ b/core/object/script_instance.cpp @@ -0,0 +1,71 @@ +/**************************************************************************/ +/* script_instance.cpp */ +/**************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/**************************************************************************/ +/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ +/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/**************************************************************************/ + +#include "script_instance.h" + +#include "core/object/script_language.h" + +Variant ScriptInstance::call_const(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { + return callp(p_method, p_args, p_argcount, r_error); +} + +void ScriptInstance::get_property_state(List<Pair<StringName, Variant>> &state) { + List<PropertyInfo> pinfo; + get_property_list(&pinfo); + for (const PropertyInfo &E : pinfo) { + if (E.usage & PROPERTY_USAGE_STORAGE) { + Pair<StringName, Variant> p; + p.first = E.name; + if (get(p.first, p.second)) { + state.push_back(p); + } + } + } +} + +void ScriptInstance::property_set_fallback(const StringName &, const Variant &, bool *r_valid) { + if (r_valid) { + *r_valid = false; + } +} + +Variant ScriptInstance::property_get_fallback(const StringName &, bool *r_valid) { + if (r_valid) { + *r_valid = false; + } + return Variant(); +} + +const Variant ScriptInstance::get_rpc_config() const { + return get_script()->get_rpc_config(); +} + +ScriptInstance::~ScriptInstance() { +} diff --git a/core/object/script_instance.h b/core/object/script_instance.h new file mode 100644 index 0000000000..df978a25ea --- /dev/null +++ b/core/object/script_instance.h @@ -0,0 +1,98 @@ +/**************************************************************************/ +/* script_instance.h */ +/**************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/**************************************************************************/ +/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ +/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/**************************************************************************/ + +#ifndef SCRIPT_INSTANCE_H +#define SCRIPT_INSTANCE_H + +#include "core/object/ref_counted.h" + +class Script; +class ScriptLanguage; + +class ScriptInstance { +public: + virtual bool set(const StringName &p_name, const Variant &p_value) = 0; + virtual bool get(const StringName &p_name, Variant &r_ret) const = 0; + virtual void get_property_list(List<PropertyInfo> *p_properties) const = 0; + virtual Variant::Type get_property_type(const StringName &p_name, bool *r_is_valid = nullptr) const = 0; + virtual void validate_property(PropertyInfo &p_property) const = 0; + + virtual bool property_can_revert(const StringName &p_name) const = 0; + virtual bool property_get_revert(const StringName &p_name, Variant &r_ret) const = 0; + + virtual Object *get_owner() { return nullptr; } + virtual void get_property_state(List<Pair<StringName, Variant>> &state); + + virtual void get_method_list(List<MethodInfo> *p_list) const = 0; + virtual bool has_method(const StringName &p_method) const = 0; + + virtual Variant callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) = 0; + + template <typename... VarArgs> + Variant call(const StringName &p_method, VarArgs... p_args) { + Variant args[sizeof...(p_args) + 1] = { p_args..., Variant() }; // +1 makes sure zero sized arrays are also supported. + const Variant *argptrs[sizeof...(p_args) + 1]; + for (uint32_t i = 0; i < sizeof...(p_args); i++) { + argptrs[i] = &args[i]; + } + Callable::CallError cerr; + return callp(p_method, sizeof...(p_args) == 0 ? nullptr : (const Variant **)argptrs, sizeof...(p_args), cerr); + } + + virtual Variant call_const(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error); // implement if language supports const functions + virtual void notification(int p_notification, bool p_reversed = false) = 0; + virtual String to_string(bool *r_valid) { + if (r_valid) { + *r_valid = false; + } + return String(); + } + + //this is used by script languages that keep a reference counter of their own + //you can make make Ref<> not die when it reaches zero, so deleting the reference + //depends entirely from the script + + virtual void refcount_incremented() {} + virtual bool refcount_decremented() { return true; } //return true if it can die + + virtual Ref<Script> get_script() const = 0; + + virtual bool is_placeholder() const { return false; } + + virtual void property_set_fallback(const StringName &p_name, const Variant &p_value, bool *r_valid); + virtual Variant property_get_fallback(const StringName &p_name, bool *r_valid); + + virtual const Variant get_rpc_config() const; + + virtual ScriptLanguage *get_language() = 0; + virtual ~ScriptInstance(); +}; + +#endif // SCRIPT_INSTANCE_H diff --git a/core/object/script_language.cpp b/core/object/script_language.cpp index 0de03662a0..abf2b7b054 100644 --- a/core/object/script_language.cpp +++ b/core/object/script_language.cpp @@ -388,40 +388,6 @@ String ScriptServer::get_global_class_cache_file_path() { //////////////////// -Variant ScriptInstance::call_const(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { - return callp(p_method, p_args, p_argcount, r_error); -} - -void ScriptInstance::get_property_state(List<Pair<StringName, Variant>> &state) { - List<PropertyInfo> pinfo; - get_property_list(&pinfo); - for (const PropertyInfo &E : pinfo) { - if (E.usage & PROPERTY_USAGE_STORAGE) { - Pair<StringName, Variant> p; - p.first = E.name; - if (get(p.first, p.second)) { - state.push_back(p); - } - } - } -} - -void ScriptInstance::property_set_fallback(const StringName &, const Variant &, bool *r_valid) { - if (r_valid) { - *r_valid = false; - } -} - -Variant ScriptInstance::property_get_fallback(const StringName &, bool *r_valid) { - if (r_valid) { - *r_valid = false; - } - return Variant(); -} - -ScriptInstance::~ScriptInstance() { -} - ScriptCodeCompletionCache *ScriptCodeCompletionCache::singleton = nullptr; ScriptCodeCompletionCache::ScriptCodeCompletionCache() { singleton = this; diff --git a/core/object/script_language.h b/core/object/script_language.h index 3cac360b1a..e0c4d650dd 100644 --- a/core/object/script_language.h +++ b/core/object/script_language.h @@ -33,6 +33,7 @@ #include "core/doc_data.h" #include "core/io/resource.h" +#include "core/object/script_instance.h" #include "core/templates/pair.h" #include "core/templates/rb_map.h" #include "core/templates/safe_refcount.h" @@ -101,7 +102,6 @@ public: static bool are_languages_finished() { return languages_finished.is_set(); } }; -class ScriptInstance; class PlaceHolderScriptInstance; class Script : public Resource { @@ -174,65 +174,6 @@ public: Script() {} }; -class ScriptInstance { -public: - virtual bool set(const StringName &p_name, const Variant &p_value) = 0; - virtual bool get(const StringName &p_name, Variant &r_ret) const = 0; - virtual void get_property_list(List<PropertyInfo> *p_properties) const = 0; - virtual Variant::Type get_property_type(const StringName &p_name, bool *r_is_valid = nullptr) const = 0; - virtual void validate_property(PropertyInfo &p_property) const = 0; - - virtual bool property_can_revert(const StringName &p_name) const = 0; - virtual bool property_get_revert(const StringName &p_name, Variant &r_ret) const = 0; - - virtual Object *get_owner() { return nullptr; } - virtual void get_property_state(List<Pair<StringName, Variant>> &state); - - virtual void get_method_list(List<MethodInfo> *p_list) const = 0; - virtual bool has_method(const StringName &p_method) const = 0; - - virtual Variant callp(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) = 0; - - template <typename... VarArgs> - Variant call(const StringName &p_method, VarArgs... p_args) { - Variant args[sizeof...(p_args) + 1] = { p_args..., Variant() }; // +1 makes sure zero sized arrays are also supported. - const Variant *argptrs[sizeof...(p_args) + 1]; - for (uint32_t i = 0; i < sizeof...(p_args); i++) { - argptrs[i] = &args[i]; - } - Callable::CallError cerr; - return callp(p_method, sizeof...(p_args) == 0 ? nullptr : (const Variant **)argptrs, sizeof...(p_args), cerr); - } - - virtual Variant call_const(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error); // implement if language supports const functions - virtual void notification(int p_notification, bool p_reversed = false) = 0; - virtual String to_string(bool *r_valid) { - if (r_valid) { - *r_valid = false; - } - return String(); - } - - //this is used by script languages that keep a reference counter of their own - //you can make make Ref<> not die when it reaches zero, so deleting the reference - //depends entirely from the script - - virtual void refcount_incremented() {} - virtual bool refcount_decremented() { return true; } //return true if it can die - - virtual Ref<Script> get_script() const = 0; - - virtual bool is_placeholder() const { return false; } - - virtual void property_set_fallback(const StringName &p_name, const Variant &p_value, bool *r_valid); - virtual Variant property_get_fallback(const StringName &p_name, bool *r_valid); - - virtual const Variant get_rpc_config() const { return get_script()->get_rpc_config(); } - - virtual ScriptLanguage *get_language() = 0; - virtual ~ScriptInstance(); -}; - class ScriptCodeCompletionCache { static ScriptCodeCompletionCache *singleton; diff --git a/core/os/main_loop.h b/core/os/main_loop.h index 90cad009b1..b45eb38aeb 100644 --- a/core/os/main_loop.h +++ b/core/os/main_loop.h @@ -34,7 +34,6 @@ #include "core/input/input_event.h" #include "core/object/gdvirtual.gen.inc" #include "core/object/ref_counted.h" -#include "core/object/script_language.h" class MainLoop : public Object { GDCLASS(MainLoop, Object); diff --git a/core/string/translation.h b/core/string/translation.h index ca8b460312..3f9dbcc476 100644 --- a/core/string/translation.h +++ b/core/string/translation.h @@ -33,7 +33,6 @@ #include "core/io/resource.h" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" class Translation : public Resource { GDCLASS(Translation, Resource); diff --git a/core/variant/variant_parser.cpp b/core/variant/variant_parser.cpp index b7bdf1d97a..fea1622222 100644 --- a/core/variant/variant_parser.cpp +++ b/core/variant/variant_parser.cpp @@ -32,6 +32,7 @@ #include "core/input/input_event.h" #include "core/io/resource_loader.h" +#include "core/object/script_language.h" #include "core/os/keyboard.h" #include "core/string/string_buffer.h" diff --git a/editor/debugger/editor_debugger_node.h b/editor/debugger/editor_debugger_node.h index e855fa6ee0..8ca709dd9b 100644 --- a/editor/debugger/editor_debugger_node.h +++ b/editor/debugger/editor_debugger_node.h @@ -31,6 +31,7 @@ #ifndef EDITOR_DEBUGGER_NODE_H #define EDITOR_DEBUGGER_NODE_H +#include "core/object/script_language.h" #include "editor/debugger/editor_debugger_server.h" #include "scene/gui/margin_container.h" diff --git a/editor/debugger/script_editor_debugger.h b/editor/debugger/script_editor_debugger.h index 7e9a767273..79224061ff 100644 --- a/editor/debugger/script_editor_debugger.h +++ b/editor/debugger/script_editor_debugger.h @@ -31,6 +31,7 @@ #ifndef SCRIPT_EDITOR_DEBUGGER_H #define SCRIPT_EDITOR_DEBUGGER_H +#include "core/object/script_language.h" #include "core/os/os.h" #include "editor/debugger/editor_debugger_inspector.h" #include "editor/debugger/editor_debugger_node.h" diff --git a/editor/editor_script.cpp b/editor/editor_script.cpp index 4e8c5ad8b5..e675b9621e 100644 --- a/editor/editor_script.cpp +++ b/editor/editor_script.cpp @@ -32,6 +32,7 @@ #include "editor/editor_interface.h" #include "editor/editor_node.h" +#include "scene/main/node.h" void EditorScript::add_root_node(Node *p_node) { if (!EditorNode::get_singleton()) { diff --git a/editor/editor_script.h b/editor/editor_script.h index d7c813261d..72e7641df7 100644 --- a/editor/editor_script.h +++ b/editor/editor_script.h @@ -33,10 +33,10 @@ #include "core/object/gdvirtual.gen.inc" #include "core/object/ref_counted.h" -#include "core/object/script_language.h" class EditorInterface; class EditorNode; +class Node; class EditorScript : public RefCounted { GDCLASS(EditorScript, RefCounted); diff --git a/editor/editor_translation_parser.h b/editor/editor_translation_parser.h index 2291bd8a70..78dc726c52 100644 --- a/editor/editor_translation_parser.h +++ b/editor/editor_translation_parser.h @@ -34,7 +34,6 @@ #include "core/error/error_list.h" #include "core/object/gdvirtual.gen.inc" #include "core/object/ref_counted.h" -#include "core/object/script_language.h" #include "core/variant/typed_array.h" class EditorTranslationParserPlugin : public RefCounted { diff --git a/editor/editor_vcs_interface.h b/editor/editor_vcs_interface.h index 814baeb37c..84f2cf9281 100644 --- a/editor/editor_vcs_interface.h +++ b/editor/editor_vcs_interface.h @@ -33,9 +33,9 @@ #include "core/object/class_db.h" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language_extension.h" #include "core/string/ustring.h" #include "core/variant/type_info.h" +#include "core/variant/typed_array.h" class EditorVCSInterface : public Object { GDCLASS(EditorVCSInterface, Object) diff --git a/editor/gui/scene_tree_editor.cpp b/editor/gui/scene_tree_editor.cpp index 321d7a3545..8e08528f19 100644 --- a/editor/gui/scene_tree_editor.cpp +++ b/editor/gui/scene_tree_editor.cpp @@ -32,6 +32,7 @@ #include "core/config/project_settings.h" #include "core/object/message_queue.h" +#include "core/object/script_language.h" #include "editor/editor_file_system.h" #include "editor/editor_node.h" #include "editor/editor_scale.h" diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 2e422d8c27..c70918e55e 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -32,6 +32,7 @@ #include "core/error/error_macros.h" #include "core/io/resource_saver.h" +#include "core/object/script_language.h" #include "editor/editor_node.h" #include "editor/editor_settings.h" #include "editor/import/scene_import_settings.h" diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp index c5a667cd5f..196a2186a7 100644 --- a/editor/plugin_config_dialog.cpp +++ b/editor/plugin_config_dialog.cpp @@ -32,6 +32,7 @@ #include "core/io/config_file.h" #include "core/io/dir_access.h" +#include "core/object/script_language.h" #include "editor/editor_node.h" #include "editor/editor_plugin.h" #include "editor/editor_scale.h" diff --git a/editor/plugins/animation_blend_tree_editor_plugin.h b/editor/plugins/animation_blend_tree_editor_plugin.h index afb3394238..90fb42cd7a 100644 --- a/editor/plugins/animation_blend_tree_editor_plugin.h +++ b/editor/plugins/animation_blend_tree_editor_plugin.h @@ -31,6 +31,7 @@ #ifndef ANIMATION_BLEND_TREE_EDITOR_PLUGIN_H #define ANIMATION_BLEND_TREE_EDITOR_PLUGIN_H +#include "core/object/script_language.h" #include "editor/plugins/animation_tree_editor_plugin.h" #include "scene/animation/animation_blend_tree.h" #include "scene/gui/button.h" diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index fba45e5372..1872857130 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -33,6 +33,7 @@ #include "core/config/project_settings.h" #include "core/io/file_access_memory.h" #include "core/io/resource_loader.h" +#include "core/object/script_language.h" #include "core/os/os.h" #include "editor/editor_paths.h" #include "editor/editor_scale.h" diff --git a/editor/plugins/editor_resource_conversion_plugin.h b/editor/plugins/editor_resource_conversion_plugin.h index 32e05585ee..1f8aad51ff 100644 --- a/editor/plugins/editor_resource_conversion_plugin.h +++ b/editor/plugins/editor_resource_conversion_plugin.h @@ -33,7 +33,6 @@ #include "core/io/resource.h" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" class EditorResourceConversionPlugin : public RefCounted { GDCLASS(EditorResourceConversionPlugin, RefCounted); diff --git a/editor/plugins/editor_resource_tooltip_plugins.h b/editor/plugins/editor_resource_tooltip_plugins.h index 3720396842..e3a27de0bb 100644 --- a/editor/plugins/editor_resource_tooltip_plugins.h +++ b/editor/plugins/editor_resource_tooltip_plugins.h @@ -33,7 +33,6 @@ #include "core/object/gdvirtual.gen.inc" #include "core/object/ref_counted.h" -#include "core/object/script_language.h" #include <scene/gui/control.h> class Control; diff --git a/editor/plugins/packed_scene_translation_parser_plugin.cpp b/editor/plugins/packed_scene_translation_parser_plugin.cpp index 83d7778196..7cb5244af9 100644 --- a/editor/plugins/packed_scene_translation_parser_plugin.cpp +++ b/editor/plugins/packed_scene_translation_parser_plugin.cpp @@ -31,6 +31,7 @@ #include "packed_scene_translation_parser_plugin.h" #include "core/io/resource_loader.h" +#include "core/object/script_language.h" #include "scene/gui/option_button.h" #include "scene/resources/packed_scene.h" diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h index a33c877d2d..0241ca0e3e 100644 --- a/editor/plugins/script_editor_plugin.h +++ b/editor/plugins/script_editor_plugin.h @@ -31,6 +31,7 @@ #ifndef SCRIPT_EDITOR_PLUGIN_H #define SCRIPT_EDITOR_PLUGIN_H +#include "core/object/script_language.h" #include "editor/editor_plugin.h" #include "scene/gui/dialogs.h" #include "scene/gui/panel_container.h" diff --git a/editor/rename_dialog.cpp b/editor/rename_dialog.cpp index 050267530d..9eeea0ac54 100644 --- a/editor/rename_dialog.cpp +++ b/editor/rename_dialog.cpp @@ -40,8 +40,8 @@ #include "editor/editor_string_names.h" #include "editor/editor_themes.h" #include "editor/editor_undo_redo_manager.h" +#include "editor/plugins/script_editor_plugin.h" #include "modules/regex/regex.h" -#include "plugins/script_editor_plugin.h" #include "scene/gui/check_box.h" #include "scene/gui/check_button.h" #include "scene/gui/control.h" diff --git a/modules/gdscript/gdscript_rpc_callable.cpp b/modules/gdscript/gdscript_rpc_callable.cpp index 265e624b6c..199ea81330 100644 --- a/modules/gdscript/gdscript_rpc_callable.cpp +++ b/modules/gdscript/gdscript_rpc_callable.cpp @@ -30,6 +30,7 @@ #include "gdscript_rpc_callable.h" +#include "core/object/script_language.h" #include "core/templates/hashfuncs.h" #include "scene/main/node.h" diff --git a/modules/mono/editor/code_completion.cpp b/modules/mono/editor/code_completion.cpp index ae02e16256..ae914e71ef 100644 --- a/modules/mono/editor/code_completion.cpp +++ b/modules/mono/editor/code_completion.cpp @@ -31,6 +31,7 @@ #include "code_completion.h" #include "core/config/project_settings.h" +#include "core/object/script_language.h" #include "editor/editor_file_system.h" #include "editor/editor_settings.h" #include "scene/gui/control.h" diff --git a/modules/multiplayer/scene_cache_interface.h b/modules/multiplayer/scene_cache_interface.h index 9400417cdb..7a7304fde8 100644 --- a/modules/multiplayer/scene_cache_interface.h +++ b/modules/multiplayer/scene_cache_interface.h @@ -33,6 +33,7 @@ #include "scene/main/multiplayer_api.h" +class Node; class SceneMultiplayer; class SceneCacheInterface : public RefCounted { diff --git a/modules/webrtc/webrtc_data_channel_extension.h b/modules/webrtc/webrtc_data_channel_extension.h index 462e089592..b7afbaf13a 100644 --- a/modules/webrtc/webrtc_data_channel_extension.h +++ b/modules/webrtc/webrtc_data_channel_extension.h @@ -35,7 +35,6 @@ #include "core/extension/ext_wrappers.gen.inc" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" #include "core/variant/native_ptr.h" class WebRTCDataChannelExtension : public WebRTCDataChannel { diff --git a/modules/webrtc/webrtc_peer_connection_extension.h b/modules/webrtc/webrtc_peer_connection_extension.h index f3339f1eb4..05d88e0f65 100644 --- a/modules/webrtc/webrtc_peer_connection_extension.h +++ b/modules/webrtc/webrtc_peer_connection_extension.h @@ -35,7 +35,6 @@ #include "core/extension/ext_wrappers.gen.inc" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" #include "core/variant/native_ptr.h" class WebRTCPeerConnectionExtension : public WebRTCPeerConnection { diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index 2a8c07be83..8f80516a9f 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -40,6 +40,7 @@ #include "core/config/project_settings.h" #include "core/extension/gdextension_manager.h" +#include "core/io/xml_parser.h" #include "drivers/unix/dir_access_unix.h" #include "drivers/unix/file_access_unix.h" #include "main/main.h" diff --git a/scene/gui/code_edit.h b/scene/gui/code_edit.h index addbb6e468..1bd4db9e2c 100644 --- a/scene/gui/code_edit.h +++ b/scene/gui/code_edit.h @@ -31,6 +31,7 @@ #ifndef CODE_EDIT_H #define CODE_EDIT_H +#include "core/object/script_language.h" #include "scene/gui/text_edit.h" class CodeEdit : public TextEdit { diff --git a/scene/gui/rich_text_effect.h b/scene/gui/rich_text_effect.h index 0799abaffc..4befdd182f 100644 --- a/scene/gui/rich_text_effect.h +++ b/scene/gui/rich_text_effect.h @@ -33,7 +33,6 @@ #include "core/io/resource.h" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" class CharFXTransform : public RefCounted { GDCLASS(CharFXTransform, RefCounted); diff --git a/scene/main/multiplayer_peer.h b/scene/main/multiplayer_peer.h index 99be9137f8..ed1d56839f 100644 --- a/scene/main/multiplayer_peer.h +++ b/scene/main/multiplayer_peer.h @@ -35,7 +35,6 @@ #include "core/extension/ext_wrappers.gen.inc" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" #include "core/variant/native_ptr.h" class MultiplayerPeer : public PacketPeer { diff --git a/scene/main/node.cpp b/scene/main/node.cpp index d8f38c9148..d8a50c4313 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -34,6 +34,7 @@ #include "core/core_string_names.h" #include "core/io/resource_loader.h" #include "core/object/message_queue.h" +#include "core/object/script_language.h" #include "core/string/print_string.h" #include "instance_placeholder.h" #include "scene/animation/tween.h" diff --git a/scene/property_utils.cpp b/scene/property_utils.cpp index bf98a8d292..063e91df67 100644 --- a/scene/property_utils.cpp +++ b/scene/property_utils.cpp @@ -31,6 +31,7 @@ #include "property_utils.h" #include "core/config/engine.h" +#include "core/object/script_language.h" #include "core/templates/local_vector.h" #include "scene/resources/packed_scene.h" diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index a2c04698e1..31f6d6a84a 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -34,6 +34,7 @@ #include "core/io/dir_access.h" #include "core/io/missing_resource.h" #include "core/io/resource_format_binary.h" +#include "core/object/script_language.h" #include "core/version.h" // Version 2: changed names for Basis, AABB, Vectors, etc. diff --git a/scene/resources/style_box.h b/scene/resources/style_box.h index 3f9a96be2f..3d3a059d0b 100644 --- a/scene/resources/style_box.h +++ b/scene/resources/style_box.h @@ -34,7 +34,6 @@ #include "core/io/resource.h" #include "core/object/class_db.h" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" class CanvasItem; diff --git a/scene/resources/syntax_highlighter.h b/scene/resources/syntax_highlighter.h index bf263f9490..cac2807ee2 100644 --- a/scene/resources/syntax_highlighter.h +++ b/scene/resources/syntax_highlighter.h @@ -33,7 +33,6 @@ #include "core/io/resource.h" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" class TextEdit; diff --git a/servers/audio/audio_effect.h b/servers/audio/audio_effect.h index 11febade3a..9952246c20 100644 --- a/servers/audio/audio_effect.h +++ b/servers/audio/audio_effect.h @@ -34,7 +34,6 @@ #include "core/io/resource.h" #include "core/math/audio_frame.h" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" #include "core/variant/native_ptr.h" class AudioEffectInstance : public RefCounted { diff --git a/servers/audio/audio_stream.h b/servers/audio/audio_stream.h index 983ca8892d..015e89fc8e 100644 --- a/servers/audio/audio_stream.h +++ b/servers/audio/audio_stream.h @@ -37,7 +37,6 @@ #include "servers/audio_server.h" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" #include "core/variant/native_ptr.h" class AudioStream; diff --git a/servers/extensions/physics_server_2d_extension.h b/servers/extensions/physics_server_2d_extension.h index 253a58d78e..6ddbb98766 100644 --- a/servers/extensions/physics_server_2d_extension.h +++ b/servers/extensions/physics_server_2d_extension.h @@ -33,7 +33,6 @@ #include "core/extension/ext_wrappers.gen.inc" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" #include "core/variant/native_ptr.h" #include "core/variant/type_info.h" #include "core/variant/typed_array.h" diff --git a/servers/physics_server_3d.h b/servers/physics_server_3d.h index cd96bf15fd..553d73b549 100644 --- a/servers/physics_server_3d.h +++ b/servers/physics_server_3d.h @@ -34,7 +34,6 @@ #include "core/io/resource.h" #include "core/object/class_db.h" #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" #include "core/variant/native_ptr.h" class PhysicsDirectSpaceState3D; diff --git a/servers/rendering/shader_preprocessor.h b/servers/rendering/shader_preprocessor.h index 9448a97d68..b29239105a 100644 --- a/servers/rendering/shader_preprocessor.h +++ b/servers/rendering/shader_preprocessor.h @@ -39,6 +39,7 @@ #include "core/typedefs.h" #include "core/io/resource_loader.h" +#include "core/object/script_language.h" #include "core/os/os.h" #include "scene/resources/shader.h" #include "scene/resources/shader_include.h" diff --git a/servers/text/text_server_extension.h b/servers/text/text_server_extension.h index 1d475f13d4..0fa483f304 100644 --- a/servers/text/text_server_extension.h +++ b/servers/text/text_server_extension.h @@ -32,7 +32,6 @@ #define TEXT_SERVER_EXTENSION_H #include "core/object/gdvirtual.gen.inc" -#include "core/object/script_language.h" #include "core/os/thread_safe.h" #include "core/variant/native_ptr.h" #include "core/variant/typed_array.h" |