Browse Source

Merge pull request #81388 from YuriSizov/core-gdvirtual-but-less-confused-about-itself

Extract `ScriptInstance` into its own file to simplify includes
Rémi Verschelde 1 year ago
parent
commit
7663c69922
53 changed files with 198 additions and 122 deletions
  1. 1 3
      core/debugger/engine_profiler.h
  2. 0 1
      core/io/packet_peer.h
  3. 1 0
      core/io/resource_format_binary.cpp
  4. 1 0
      core/io/resource_loader.cpp
  5. 0 1
      core/io/resource_loader.h
  6. 0 1
      core/io/resource_saver.h
  7. 0 1
      core/io/stream_peer.h
  8. 0 1
      core/math/a_star.h
  9. 0 1
      core/math/a_star_grid_2d.h
  10. 2 0
      core/object/make_virtuals.py
  11. 71 0
      core/object/script_instance.cpp
  12. 98 0
      core/object/script_instance.h
  13. 0 34
      core/object/script_language.cpp
  14. 1 60
      core/object/script_language.h
  15. 0 1
      core/os/main_loop.h
  16. 0 1
      core/string/translation.h
  17. 1 0
      core/variant/variant_parser.cpp
  18. 1 0
      editor/debugger/editor_debugger_node.h
  19. 1 0
      editor/debugger/script_editor_debugger.h
  20. 1 0
      editor/editor_script.cpp
  21. 1 1
      editor/editor_script.h
  22. 0 1
      editor/editor_translation_parser.h
  23. 1 1
      editor/editor_vcs_interface.h
  24. 1 0
      editor/gui/scene_tree_editor.cpp
  25. 1 0
      editor/import/resource_importer_scene.cpp
  26. 1 0
      editor/plugin_config_dialog.cpp
  27. 1 0
      editor/plugins/animation_blend_tree_editor_plugin.h
  28. 1 0
      editor/plugins/editor_preview_plugins.cpp
  29. 0 1
      editor/plugins/editor_resource_conversion_plugin.h
  30. 0 1
      editor/plugins/editor_resource_tooltip_plugins.h
  31. 1 0
      editor/plugins/packed_scene_translation_parser_plugin.cpp
  32. 1 0
      editor/plugins/script_editor_plugin.h
  33. 1 1
      editor/rename_dialog.cpp
  34. 1 0
      modules/gdscript/gdscript_rpc_callable.cpp
  35. 1 0
      modules/mono/editor/code_completion.cpp
  36. 1 0
      modules/multiplayer/scene_cache_interface.h
  37. 0 1
      modules/webrtc/webrtc_data_channel_extension.h
  38. 0 1
      modules/webrtc/webrtc_peer_connection_extension.h
  39. 1 0
      platform/android/os_android.cpp
  40. 1 0
      scene/gui/code_edit.h
  41. 0 1
      scene/gui/rich_text_effect.h
  42. 0 1
      scene/main/multiplayer_peer.h
  43. 1 0
      scene/main/node.cpp
  44. 1 0
      scene/property_utils.cpp
  45. 1 0
      scene/resources/resource_format_text.cpp
  46. 0 1
      scene/resources/style_box.h
  47. 0 1
      scene/resources/syntax_highlighter.h
  48. 0 1
      servers/audio/audio_effect.h
  49. 0 1
      servers/audio/audio_stream.h
  50. 0 1
      servers/extensions/physics_server_2d_extension.h
  51. 0 1
      servers/physics_server_3d.h
  52. 1 0
      servers/rendering/shader_preprocessor.h
  53. 0 1
      servers/text/text_server_extension.h

+ 1 - 3
core/debugger/engine_profiler.h

@@ -31,10 +31,8 @@
 #ifndef ENGINE_PROFILER_H
 #ifndef ENGINE_PROFILER_H
 #define ENGINE_PROFILER_H
 #define ENGINE_PROFILER_H
 
 
-#include "core/object/ref_counted.h"
-
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
+#include "core/object/ref_counted.h"
 
 
 class EngineProfiler : public RefCounted {
 class EngineProfiler : public RefCounted {
 	GDCLASS(EngineProfiler, RefCounted);
 	GDCLASS(EngineProfiler, RefCounted);

+ 0 - 1
core/io/packet_peer.h

@@ -37,7 +37,6 @@
 
 
 #include "core/extension/ext_wrappers.gen.inc"
 #include "core/extension/ext_wrappers.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
 #include "core/variant/native_ptr.h"
 #include "core/variant/native_ptr.h"
 
 
 class PacketPeer : public RefCounted {
 class PacketPeer : public RefCounted {

+ 1 - 0
core/io/resource_format_binary.cpp

@@ -36,6 +36,7 @@
 #include "core/io/image.h"
 #include "core/io/image.h"
 #include "core/io/marshalls.h"
 #include "core/io/marshalls.h"
 #include "core/io/missing_resource.h"
 #include "core/io/missing_resource.h"
+#include "core/object/script_language.h"
 #include "core/version.h"
 #include "core/version.h"
 
 
 //#define print_bl(m_what) print_line(m_what)
 //#define print_bl(m_what) print_line(m_what)

+ 1 - 0
core/io/resource_loader.cpp

@@ -33,6 +33,7 @@
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/io/file_access.h"
 #include "core/io/file_access.h"
 #include "core/io/resource_importer.h"
 #include "core/io/resource_importer.h"
+#include "core/object/script_language.h"
 #include "core/os/condition_variable.h"
 #include "core/os/condition_variable.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "core/string/print_string.h"
 #include "core/string/print_string.h"

+ 0 - 1
core/io/resource_loader.h

@@ -33,7 +33,6 @@
 
 
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
 #include "core/object/worker_thread_pool.h"
 #include "core/object/worker_thread_pool.h"
 #include "core/os/semaphore.h"
 #include "core/os/semaphore.h"
 #include "core/os/thread.h"
 #include "core/os/thread.h"

+ 0 - 1
core/io/resource_saver.h

@@ -33,7 +33,6 @@
 
 
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
 
 
 class ResourceFormatSaver : public RefCounted {
 class ResourceFormatSaver : public RefCounted {
 	GDCLASS(ResourceFormatSaver, RefCounted);
 	GDCLASS(ResourceFormatSaver, RefCounted);

+ 0 - 1
core/io/stream_peer.h

@@ -35,7 +35,6 @@
 
 
 #include "core/extension/ext_wrappers.gen.inc"
 #include "core/extension/ext_wrappers.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
 #include "core/variant/native_ptr.h"
 #include "core/variant/native_ptr.h"
 
 
 class StreamPeer : public RefCounted {
 class StreamPeer : public RefCounted {

+ 0 - 1
core/math/a_star.h

@@ -33,7 +33,6 @@
 
 
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
-#include "core/object/script_language.h"
 #include "core/templates/oa_hash_map.h"
 #include "core/templates/oa_hash_map.h"
 
 
 /**
 /**

+ 0 - 1
core/math/a_star_grid_2d.h

@@ -33,7 +33,6 @@
 
 
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
-#include "core/object/script_language.h"
 #include "core/templates/list.h"
 #include "core/templates/list.h"
 #include "core/templates/local_vector.h"
 #include "core/templates/local_vector.h"
 
 

+ 2 - 0
core/object/make_virtuals.py

@@ -160,6 +160,8 @@ def run(target, source, env):
 #ifndef GDVIRTUAL_GEN_H
 #ifndef GDVIRTUAL_GEN_H
 #define GDVIRTUAL_GEN_H
 #define GDVIRTUAL_GEN_H
 
 
+#include "core/object/script_instance.h"
+
 
 
 """
 """
 
 

+ 71 - 0
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() {
+}

+ 98 - 0
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

+ 0 - 34
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 = nullptr;
 ScriptCodeCompletionCache::ScriptCodeCompletionCache() {
 ScriptCodeCompletionCache::ScriptCodeCompletionCache() {
 	singleton = this;
 	singleton = this;

+ 1 - 60
core/object/script_language.h

@@ -33,6 +33,7 @@
 
 
 #include "core/doc_data.h"
 #include "core/doc_data.h"
 #include "core/io/resource.h"
 #include "core/io/resource.h"
+#include "core/object/script_instance.h"
 #include "core/templates/pair.h"
 #include "core/templates/pair.h"
 #include "core/templates/rb_map.h"
 #include "core/templates/rb_map.h"
 #include "core/templates/safe_refcount.h"
 #include "core/templates/safe_refcount.h"
@@ -101,7 +102,6 @@ public:
 	static bool are_languages_finished() { return languages_finished.is_set(); }
 	static bool are_languages_finished() { return languages_finished.is_set(); }
 };
 };
 
 
-class ScriptInstance;
 class PlaceHolderScriptInstance;
 class PlaceHolderScriptInstance;
 
 
 class Script : public Resource {
 class Script : public Resource {
@@ -174,65 +174,6 @@ public:
 	Script() {}
 	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 {
 class ScriptCodeCompletionCache {
 	static ScriptCodeCompletionCache *singleton;
 	static ScriptCodeCompletionCache *singleton;
 
 

+ 0 - 1
core/os/main_loop.h

@@ -34,7 +34,6 @@
 #include "core/input/input_event.h"
 #include "core/input/input_event.h"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
-#include "core/object/script_language.h"
 
 
 class MainLoop : public Object {
 class MainLoop : public Object {
 	GDCLASS(MainLoop, Object);
 	GDCLASS(MainLoop, Object);

+ 0 - 1
core/string/translation.h

@@ -33,7 +33,6 @@
 
 
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
 
 
 class Translation : public Resource {
 class Translation : public Resource {
 	GDCLASS(Translation, Resource);
 	GDCLASS(Translation, Resource);

+ 1 - 0
core/variant/variant_parser.cpp

@@ -32,6 +32,7 @@
 
 
 #include "core/input/input_event.h"
 #include "core/input/input_event.h"
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
+#include "core/object/script_language.h"
 #include "core/os/keyboard.h"
 #include "core/os/keyboard.h"
 #include "core/string/string_buffer.h"
 #include "core/string/string_buffer.h"
 
 

+ 1 - 0
editor/debugger/editor_debugger_node.h

@@ -31,6 +31,7 @@
 #ifndef EDITOR_DEBUGGER_NODE_H
 #ifndef EDITOR_DEBUGGER_NODE_H
 #define EDITOR_DEBUGGER_NODE_H
 #define EDITOR_DEBUGGER_NODE_H
 
 
+#include "core/object/script_language.h"
 #include "editor/debugger/editor_debugger_server.h"
 #include "editor/debugger/editor_debugger_server.h"
 #include "scene/gui/margin_container.h"
 #include "scene/gui/margin_container.h"
 
 

+ 1 - 0
editor/debugger/script_editor_debugger.h

@@ -31,6 +31,7 @@
 #ifndef SCRIPT_EDITOR_DEBUGGER_H
 #ifndef SCRIPT_EDITOR_DEBUGGER_H
 #define SCRIPT_EDITOR_DEBUGGER_H
 #define SCRIPT_EDITOR_DEBUGGER_H
 
 
+#include "core/object/script_language.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "editor/debugger/editor_debugger_inspector.h"
 #include "editor/debugger/editor_debugger_inspector.h"
 #include "editor/debugger/editor_debugger_node.h"
 #include "editor/debugger/editor_debugger_node.h"

+ 1 - 0
editor/editor_script.cpp

@@ -32,6 +32,7 @@
 
 
 #include "editor/editor_interface.h"
 #include "editor/editor_interface.h"
 #include "editor/editor_node.h"
 #include "editor/editor_node.h"
+#include "scene/main/node.h"
 
 
 void EditorScript::add_root_node(Node *p_node) {
 void EditorScript::add_root_node(Node *p_node) {
 	if (!EditorNode::get_singleton()) {
 	if (!EditorNode::get_singleton()) {

+ 1 - 1
editor/editor_script.h

@@ -33,10 +33,10 @@
 
 
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
-#include "core/object/script_language.h"
 
 
 class EditorInterface;
 class EditorInterface;
 class EditorNode;
 class EditorNode;
+class Node;
 
 
 class EditorScript : public RefCounted {
 class EditorScript : public RefCounted {
 	GDCLASS(EditorScript, RefCounted);
 	GDCLASS(EditorScript, RefCounted);

+ 0 - 1
editor/editor_translation_parser.h

@@ -34,7 +34,6 @@
 #include "core/error/error_list.h"
 #include "core/error/error_list.h"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
-#include "core/object/script_language.h"
 #include "core/variant/typed_array.h"
 #include "core/variant/typed_array.h"
 
 
 class EditorTranslationParserPlugin : public RefCounted {
 class EditorTranslationParserPlugin : public RefCounted {

+ 1 - 1
editor/editor_vcs_interface.h

@@ -33,9 +33,9 @@
 
 
 #include "core/object/class_db.h"
 #include "core/object/class_db.h"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language_extension.h"
 #include "core/string/ustring.h"
 #include "core/string/ustring.h"
 #include "core/variant/type_info.h"
 #include "core/variant/type_info.h"
+#include "core/variant/typed_array.h"
 
 
 class EditorVCSInterface : public Object {
 class EditorVCSInterface : public Object {
 	GDCLASS(EditorVCSInterface, Object)
 	GDCLASS(EditorVCSInterface, Object)

+ 1 - 0
editor/gui/scene_tree_editor.cpp

@@ -32,6 +32,7 @@
 
 
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/object/message_queue.h"
 #include "core/object/message_queue.h"
+#include "core/object/script_language.h"
 #include "editor/editor_file_system.h"
 #include "editor/editor_file_system.h"
 #include "editor/editor_node.h"
 #include "editor/editor_node.h"
 #include "editor/editor_scale.h"
 #include "editor/editor_scale.h"

+ 1 - 0
editor/import/resource_importer_scene.cpp

@@ -32,6 +32,7 @@
 
 
 #include "core/error/error_macros.h"
 #include "core/error/error_macros.h"
 #include "core/io/resource_saver.h"
 #include "core/io/resource_saver.h"
+#include "core/object/script_language.h"
 #include "editor/editor_node.h"
 #include "editor/editor_node.h"
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
 #include "editor/import/scene_import_settings.h"
 #include "editor/import/scene_import_settings.h"

+ 1 - 0
editor/plugin_config_dialog.cpp

@@ -32,6 +32,7 @@
 
 
 #include "core/io/config_file.h"
 #include "core/io/config_file.h"
 #include "core/io/dir_access.h"
 #include "core/io/dir_access.h"
+#include "core/object/script_language.h"
 #include "editor/editor_node.h"
 #include "editor/editor_node.h"
 #include "editor/editor_plugin.h"
 #include "editor/editor_plugin.h"
 #include "editor/editor_scale.h"
 #include "editor/editor_scale.h"

+ 1 - 0
editor/plugins/animation_blend_tree_editor_plugin.h

@@ -31,6 +31,7 @@
 #ifndef ANIMATION_BLEND_TREE_EDITOR_PLUGIN_H
 #ifndef ANIMATION_BLEND_TREE_EDITOR_PLUGIN_H
 #define 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 "editor/plugins/animation_tree_editor_plugin.h"
 #include "scene/animation/animation_blend_tree.h"
 #include "scene/animation/animation_blend_tree.h"
 #include "scene/gui/button.h"
 #include "scene/gui/button.h"

+ 1 - 0
editor/plugins/editor_preview_plugins.cpp

@@ -33,6 +33,7 @@
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/io/file_access_memory.h"
 #include "core/io/file_access_memory.h"
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
+#include "core/object/script_language.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "editor/editor_paths.h"
 #include "editor/editor_paths.h"
 #include "editor/editor_scale.h"
 #include "editor/editor_scale.h"

+ 0 - 1
editor/plugins/editor_resource_conversion_plugin.h

@@ -33,7 +33,6 @@
 
 
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
 
 
 class EditorResourceConversionPlugin : public RefCounted {
 class EditorResourceConversionPlugin : public RefCounted {
 	GDCLASS(EditorResourceConversionPlugin, RefCounted);
 	GDCLASS(EditorResourceConversionPlugin, RefCounted);

+ 0 - 1
editor/plugins/editor_resource_tooltip_plugins.h

@@ -33,7 +33,6 @@
 
 
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/ref_counted.h"
 #include "core/object/ref_counted.h"
-#include "core/object/script_language.h"
 #include <scene/gui/control.h>
 #include <scene/gui/control.h>
 
 
 class Control;
 class Control;

+ 1 - 0
editor/plugins/packed_scene_translation_parser_plugin.cpp

@@ -31,6 +31,7 @@
 #include "packed_scene_translation_parser_plugin.h"
 #include "packed_scene_translation_parser_plugin.h"
 
 
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
+#include "core/object/script_language.h"
 #include "scene/gui/option_button.h"
 #include "scene/gui/option_button.h"
 #include "scene/resources/packed_scene.h"
 #include "scene/resources/packed_scene.h"
 
 

+ 1 - 0
editor/plugins/script_editor_plugin.h

@@ -31,6 +31,7 @@
 #ifndef SCRIPT_EDITOR_PLUGIN_H
 #ifndef SCRIPT_EDITOR_PLUGIN_H
 #define SCRIPT_EDITOR_PLUGIN_H
 #define SCRIPT_EDITOR_PLUGIN_H
 
 
+#include "core/object/script_language.h"
 #include "editor/editor_plugin.h"
 #include "editor/editor_plugin.h"
 #include "scene/gui/dialogs.h"
 #include "scene/gui/dialogs.h"
 #include "scene/gui/panel_container.h"
 #include "scene/gui/panel_container.h"

+ 1 - 1
editor/rename_dialog.cpp

@@ -40,8 +40,8 @@
 #include "editor/editor_string_names.h"
 #include "editor/editor_string_names.h"
 #include "editor/editor_themes.h"
 #include "editor/editor_themes.h"
 #include "editor/editor_undo_redo_manager.h"
 #include "editor/editor_undo_redo_manager.h"
+#include "editor/plugins/script_editor_plugin.h"
 #include "modules/regex/regex.h"
 #include "modules/regex/regex.h"
-#include "plugins/script_editor_plugin.h"
 #include "scene/gui/check_box.h"
 #include "scene/gui/check_box.h"
 #include "scene/gui/check_button.h"
 #include "scene/gui/check_button.h"
 #include "scene/gui/control.h"
 #include "scene/gui/control.h"

+ 1 - 0
modules/gdscript/gdscript_rpc_callable.cpp

@@ -30,6 +30,7 @@
 
 
 #include "gdscript_rpc_callable.h"
 #include "gdscript_rpc_callable.h"
 
 
+#include "core/object/script_language.h"
 #include "core/templates/hashfuncs.h"
 #include "core/templates/hashfuncs.h"
 #include "scene/main/node.h"
 #include "scene/main/node.h"
 
 

+ 1 - 0
modules/mono/editor/code_completion.cpp

@@ -31,6 +31,7 @@
 #include "code_completion.h"
 #include "code_completion.h"
 
 
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
+#include "core/object/script_language.h"
 #include "editor/editor_file_system.h"
 #include "editor/editor_file_system.h"
 #include "editor/editor_settings.h"
 #include "editor/editor_settings.h"
 #include "scene/gui/control.h"
 #include "scene/gui/control.h"

+ 1 - 0
modules/multiplayer/scene_cache_interface.h

@@ -33,6 +33,7 @@
 
 
 #include "scene/main/multiplayer_api.h"
 #include "scene/main/multiplayer_api.h"
 
 
+class Node;
 class SceneMultiplayer;
 class SceneMultiplayer;
 
 
 class SceneCacheInterface : public RefCounted {
 class SceneCacheInterface : public RefCounted {

+ 0 - 1
modules/webrtc/webrtc_data_channel_extension.h

@@ -35,7 +35,6 @@
 
 
 #include "core/extension/ext_wrappers.gen.inc"
 #include "core/extension/ext_wrappers.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
 #include "core/variant/native_ptr.h"
 #include "core/variant/native_ptr.h"
 
 
 class WebRTCDataChannelExtension : public WebRTCDataChannel {
 class WebRTCDataChannelExtension : public WebRTCDataChannel {

+ 0 - 1
modules/webrtc/webrtc_peer_connection_extension.h

@@ -35,7 +35,6 @@
 
 
 #include "core/extension/ext_wrappers.gen.inc"
 #include "core/extension/ext_wrappers.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
 #include "core/variant/native_ptr.h"
 #include "core/variant/native_ptr.h"
 
 
 class WebRTCPeerConnectionExtension : public WebRTCPeerConnection {
 class WebRTCPeerConnectionExtension : public WebRTCPeerConnection {

+ 1 - 0
platform/android/os_android.cpp

@@ -40,6 +40,7 @@
 
 
 #include "core/config/project_settings.h"
 #include "core/config/project_settings.h"
 #include "core/extension/gdextension_manager.h"
 #include "core/extension/gdextension_manager.h"
+#include "core/io/xml_parser.h"
 #include "drivers/unix/dir_access_unix.h"
 #include "drivers/unix/dir_access_unix.h"
 #include "drivers/unix/file_access_unix.h"
 #include "drivers/unix/file_access_unix.h"
 #include "main/main.h"
 #include "main/main.h"

+ 1 - 0
scene/gui/code_edit.h

@@ -31,6 +31,7 @@
 #ifndef CODE_EDIT_H
 #ifndef CODE_EDIT_H
 #define CODE_EDIT_H
 #define CODE_EDIT_H
 
 
+#include "core/object/script_language.h"
 #include "scene/gui/text_edit.h"
 #include "scene/gui/text_edit.h"
 
 
 class CodeEdit : public TextEdit {
 class CodeEdit : public TextEdit {

+ 0 - 1
scene/gui/rich_text_effect.h

@@ -33,7 +33,6 @@
 
 
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
 
 
 class CharFXTransform : public RefCounted {
 class CharFXTransform : public RefCounted {
 	GDCLASS(CharFXTransform, RefCounted);
 	GDCLASS(CharFXTransform, RefCounted);

+ 0 - 1
scene/main/multiplayer_peer.h

@@ -35,7 +35,6 @@
 
 
 #include "core/extension/ext_wrappers.gen.inc"
 #include "core/extension/ext_wrappers.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
 #include "core/variant/native_ptr.h"
 #include "core/variant/native_ptr.h"
 
 
 class MultiplayerPeer : public PacketPeer {
 class MultiplayerPeer : public PacketPeer {

+ 1 - 0
scene/main/node.cpp

@@ -34,6 +34,7 @@
 #include "core/core_string_names.h"
 #include "core/core_string_names.h"
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
 #include "core/object/message_queue.h"
 #include "core/object/message_queue.h"
+#include "core/object/script_language.h"
 #include "core/string/print_string.h"
 #include "core/string/print_string.h"
 #include "instance_placeholder.h"
 #include "instance_placeholder.h"
 #include "scene/animation/tween.h"
 #include "scene/animation/tween.h"

+ 1 - 0
scene/property_utils.cpp

@@ -31,6 +31,7 @@
 #include "property_utils.h"
 #include "property_utils.h"
 
 
 #include "core/config/engine.h"
 #include "core/config/engine.h"
+#include "core/object/script_language.h"
 #include "core/templates/local_vector.h"
 #include "core/templates/local_vector.h"
 #include "scene/resources/packed_scene.h"
 #include "scene/resources/packed_scene.h"
 
 

+ 1 - 0
scene/resources/resource_format_text.cpp

@@ -34,6 +34,7 @@
 #include "core/io/dir_access.h"
 #include "core/io/dir_access.h"
 #include "core/io/missing_resource.h"
 #include "core/io/missing_resource.h"
 #include "core/io/resource_format_binary.h"
 #include "core/io/resource_format_binary.h"
+#include "core/object/script_language.h"
 #include "core/version.h"
 #include "core/version.h"
 
 
 // Version 2: changed names for Basis, AABB, Vectors, etc.
 // Version 2: changed names for Basis, AABB, Vectors, etc.

+ 0 - 1
scene/resources/style_box.h

@@ -34,7 +34,6 @@
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 #include "core/object/class_db.h"
 #include "core/object/class_db.h"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
 
 
 class CanvasItem;
 class CanvasItem;
 
 

+ 0 - 1
scene/resources/syntax_highlighter.h

@@ -33,7 +33,6 @@
 
 
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
 
 
 class TextEdit;
 class TextEdit;
 
 

+ 0 - 1
servers/audio/audio_effect.h

@@ -34,7 +34,6 @@
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 #include "core/math/audio_frame.h"
 #include "core/math/audio_frame.h"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
 #include "core/variant/native_ptr.h"
 #include "core/variant/native_ptr.h"
 
 
 class AudioEffectInstance : public RefCounted {
 class AudioEffectInstance : public RefCounted {

+ 0 - 1
servers/audio/audio_stream.h

@@ -37,7 +37,6 @@
 #include "servers/audio_server.h"
 #include "servers/audio_server.h"
 
 
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
 #include "core/variant/native_ptr.h"
 #include "core/variant/native_ptr.h"
 
 
 class AudioStream;
 class AudioStream;

+ 0 - 1
servers/extensions/physics_server_2d_extension.h

@@ -33,7 +33,6 @@
 
 
 #include "core/extension/ext_wrappers.gen.inc"
 #include "core/extension/ext_wrappers.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
 #include "core/variant/native_ptr.h"
 #include "core/variant/native_ptr.h"
 #include "core/variant/type_info.h"
 #include "core/variant/type_info.h"
 #include "core/variant/typed_array.h"
 #include "core/variant/typed_array.h"

+ 0 - 1
servers/physics_server_3d.h

@@ -34,7 +34,6 @@
 #include "core/io/resource.h"
 #include "core/io/resource.h"
 #include "core/object/class_db.h"
 #include "core/object/class_db.h"
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
 #include "core/variant/native_ptr.h"
 #include "core/variant/native_ptr.h"
 
 
 class PhysicsDirectSpaceState3D;
 class PhysicsDirectSpaceState3D;

+ 1 - 0
servers/rendering/shader_preprocessor.h

@@ -39,6 +39,7 @@
 #include "core/typedefs.h"
 #include "core/typedefs.h"
 
 
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
+#include "core/object/script_language.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "scene/resources/shader.h"
 #include "scene/resources/shader.h"
 #include "scene/resources/shader_include.h"
 #include "scene/resources/shader_include.h"

+ 0 - 1
servers/text/text_server_extension.h

@@ -32,7 +32,6 @@
 #define TEXT_SERVER_EXTENSION_H
 #define TEXT_SERVER_EXTENSION_H
 
 
 #include "core/object/gdvirtual.gen.inc"
 #include "core/object/gdvirtual.gen.inc"
-#include "core/object/script_language.h"
 #include "core/os/thread_safe.h"
 #include "core/os/thread_safe.h"
 #include "core/variant/native_ptr.h"
 #include "core/variant/native_ptr.h"
 #include "core/variant/typed_array.h"
 #include "core/variant/typed_array.h"