rm class_db.h from resource.h

This commit is contained in:
StarryWorm 2026-02-27 15:30:51 -05:00
parent 95535167b3
commit 357fa00a4a
111 changed files with 284 additions and 141 deletions

View file

@ -33,6 +33,7 @@
#include "core/debugger/engine_profiler.h"
#include "core/io/resource_loader.h"
#include "core/io/resource_saver.h"
#include "core/object/class_db.h"
#include "core/object/script_backtrace.h"
#include "core/os/semaphore.h"
#include "core/os/thread.h"

View file

@ -33,6 +33,7 @@
#include "http_client_tcp.h"
#include "core/io/stream_peer_tls.h"
#include "core/object/class_db.h"
#include "core/version.h"
HTTPClient *HTTPClientTCP::_create_func(bool p_notify_postinitialize) {

View file

@ -30,7 +30,6 @@
#pragma once
#include "core/core_bind.h"
#include "core/io/file_access.h"
#include "core/io/image.h"
#include "core/io/resource_loader.h"

View file

@ -38,6 +38,14 @@
#include "core/variant/container_type_validate.h"
#include "scene/main/node.h" //only so casting works
void Resource::register_custom_data_to_otdb() {
ClassDB::add_resource_base_extension("res", get_class_static());
}
void Resource::_add_resource_base_extension_to_classdb(const String &p_extension, const String &p_class) {
ClassDB::add_resource_base_extension(p_extension, p_class);
}
void Resource::emit_changed() {
if (emit_changed_state != EMIT_CHANGED_UNBLOCKED) {
emit_changed_state = EMIT_CHANGED_BLOCKED_PENDING_EMIT;

View file

@ -31,18 +31,18 @@
#pragma once
#include "core/io/resource_uid.h"
#include "core/object/class_db.h"
#include "core/object/gdvirtual.gen.h"
#include "core/object/ref_counted.h"
#include "core/templates/safe_refcount.h"
#include "core/templates/self_list.h"
class Node;
class RWLock;
#define RES_BASE_EXTENSION(m_ext) \
public: \
static void register_custom_data_to_otdb() { \
ClassDB::add_resource_base_extension(m_ext, get_class_static()); \
Resource::_add_resource_base_extension_to_classdb(m_ext, get_class_static()); \
} \
virtual String get_base_extension() const override { \
return m_ext; \
@ -56,10 +56,11 @@ class Resource : public RefCounted {
public:
static constexpr AncestralClass static_ancestral_class = AncestralClass::RESOURCE;
static void register_custom_data_to_otdb() { ClassDB::add_resource_base_extension("res", get_class_static()); }
static void register_custom_data_to_otdb();
virtual String get_base_extension() const { return "res"; }
protected:
static void _add_resource_base_extension_to_classdb(const String &p_extension, const String &p_class);
struct DuplicateParams {
bool deep = false;
ResourceDeepDuplicateMode subres_mode = RESOURCE_DEEP_DUPLICATE_MAX;

View file

@ -34,6 +34,7 @@
#include "core/io/dir_access.h"
#include "core/io/file_access_compressed.h"
#include "core/io/missing_resource.h"
#include "core/object/class_db.h"
#include "core/object/script_language.h"
#include "core/version.h"
#include "scene/property_utils.h"

View file

@ -32,7 +32,6 @@
#include "core/io/stream_peer.h"
#include "core/core_bind.h"
#include "core/io/compression.h"
#include "core/templates/ring_buffer.h"

View file

@ -30,6 +30,7 @@
#pragma once
#include "core/object/class_db.h"
#include "core/object/script_language.h"
#include "core/variant/variant.h"

View file

@ -33,6 +33,7 @@
#include "core/crypto/crypto_core.h"
#include "core/io/resource_loader.h"
#include "core/io/resource_uid.h"
#include "core/object/class_db.h"
#include "core/object/script_language.h"
#include "core/string/string_buffer.h"

View file

@ -34,6 +34,7 @@
#include <os/signpost.h>
#include <simd/simd.h>
#include <shared_mutex>
#include <string>
#pragma mark - Resource Factory

View file

@ -33,6 +33,7 @@
#include "core/io/dir_access.h"
#include "core/io/file_access.h"
#include "core/io/zip_io.h"
#include "core/object/class_db.h"
#include "editor/editor_node.h"
#include "editor/editor_string_names.h"
#include "editor/file_system/editor_file_system.h"

View file

@ -37,6 +37,7 @@
#include "core/io/compression.h"
#include "core/io/dir_access.h"
#include "core/io/resource_importer.h"
#include "core/object/class_db.h"
#include "core/object/script_language.h"
#include "core/string/translation_server.h"
#include "editor/export/editor_export_platform.h"

View file

@ -30,6 +30,7 @@
#include "dock_tab_container.h"
#include "core/object/callable_method_pointer.h"
#include "editor/docks/editor_dock.h"
#include "editor/docks/editor_dock_manager.h"
#include "editor/editor_node.h"

View file

@ -31,6 +31,7 @@
#include "editor_main_screen.h"
#include "core/io/config_file.h"
#include "core/object/callable_method_pointer.h"
#include "editor/editor_node.h"
#include "editor/editor_string_names.h"
#include "editor/plugins/editor_plugin.h"

View file

@ -240,6 +240,12 @@ EditorFileSystemDirectory::~EditorFileSystemDirectory() {
}
}
void EditorFileSystemImportFormatSupportQuery::_bind_methods() {
GDVIRTUAL_BIND(_is_active);
GDVIRTUAL_BIND(_get_file_extensions);
GDVIRTUAL_BIND(_query);
}
EditorFileSystem::ScannedDirectory::~ScannedDirectory() {
for (ScannedDirectory *dir : subdirs) {
memdelete(dir);

View file

@ -121,11 +121,7 @@ protected:
GDVIRTUAL0RC_REQUIRED(bool, _is_active)
GDVIRTUAL0RC_REQUIRED(Vector<String>, _get_file_extensions)
GDVIRTUAL0RC_REQUIRED(bool, _query)
static void _bind_methods() {
GDVIRTUAL_BIND(_is_active);
GDVIRTUAL_BIND(_get_file_extensions);
GDVIRTUAL_BIND(_query);
}
static void _bind_methods();
public:
virtual bool is_active() const {

View file

@ -34,6 +34,7 @@
#include "core/donors.gen.h"
#include "core/input/input.h"
#include "core/license.gen.h"
#include "core/object/callable_method_pointer.h"
#include "core/string/string_builder.h"
#include "editor/editor_node.h"
#include "editor/editor_string_names.h"

View file

@ -30,6 +30,7 @@
#include "editor_bottom_panel.h"
#include "core/object/callable_method_pointer.h"
#include "editor/debugger/editor_debugger_node.h"
#include "editor/docks/editor_dock.h"
#include "editor/docks/editor_dock_manager.h"

View file

@ -30,6 +30,8 @@
#include "editor_title_bar.h"
#include "core/object/callable_method_pointer.h"
void EditorTitleBar::gui_input(const Ref<InputEvent> &p_event) {
if (!can_move) {
return;

View file

@ -30,6 +30,7 @@
#include "editor_validation_panel.h"
#include "core/object/callable_method_pointer.h"
#include "editor/editor_string_names.h"
#include "editor/themes/editor_scale.h"
#include "scene/gui/box_container.h"

View file

@ -30,6 +30,7 @@
#include "progress_dialog.h"
#include "core/object/callable_method_pointer.h"
#include "core/os/os.h"
#include "editor/editor_node.h"
#include "editor/themes/editor_scale.h"

View file

@ -31,6 +31,7 @@
#include "touch_actions_panel.h"
#include "core/input/input.h"
#include "core/object/callable_method_pointer.h"
#include "editor/editor_string_names.h"
#include "editor/settings/editor_settings.h"
#include "scene/gui/box_container.h"

View file

@ -31,6 +31,7 @@
#include "editor_atlas_packer.h"
#include "core/math/geometry_2d.h"
#include "core/math/math_funcs_binary.h"
#include "core/math/vector2.h"
#include "core/math/vector2i.h"
#include "scene/resources/bit_map.h"

View file

@ -32,6 +32,8 @@
#include "scene/main/viewport.h"
#include "core/object/callable_method_pointer.h"
bool EditorInspectorPluginSubViewportPreview::can_handle(Object *p_object) {
return Object::cast_to<SubViewport>(p_object) != nullptr;
}

View file

@ -30,6 +30,7 @@
#include "tool_button_editor_plugin.h"
#include "core/object/callable_method_pointer.h"
#include "editor/editor_node.h"
#include "editor/inspector/multi_node_edit.h"

View file

@ -30,6 +30,7 @@
#include "joint_3d_gizmo_plugin.h"
#include "core/object/callable_method_pointer.h"
#include "editor/editor_node.h"
#include "editor/settings/editor_settings.h"
#include "scene/3d/physics/joints/cone_twist_joint_3d.h"

View file

@ -31,6 +31,7 @@
#include "mesh_editor_plugin.h"
#include "core/config/project_settings.h"
#include "core/object/callable_method_pointer.h"
#include "editor/editor_node.h"
#include "editor/themes/editor_scale.h"
#include "scene/gui/button.h"

View file

@ -30,6 +30,7 @@
#include "skeleton_ik_3d_editor_plugin.h"
#include "core/object/callable_method_pointer.h"
#include "editor/editor_node.h"
#include "editor/editor_string_names.h"
#include "scene/3d/skeleton_ik_3d.h"

View file

@ -30,6 +30,7 @@
#include "margin_container_editor_plugin.h"
#include "core/object/callable_method_pointer.h"
#include "editor/scene/canvas_item_editor_plugin.h"
#include "editor/themes/editor_scale.h"

View file

@ -30,6 +30,7 @@
#include "style_box_editor_plugin.h"
#include "core/object/callable_method_pointer.h"
#include "editor/themes/editor_scale.h"
#include "scene/gui/button.h"
#include "scene/resources/style_box_texture.h"

View file

@ -30,6 +30,7 @@
#include "virtual_joystick_editor_plugin.h"
#include "core/object/callable_method_pointer.h"
#include "editor/scene/canvas_item_editor_plugin.h"
#include "editor/themes/editor_scale.h"
#include "scene/gui/virtual_joystick.h"

View file

@ -30,6 +30,7 @@
#include "packed_scene_editor_plugin.h"
#include "core/object/callable_method_pointer.h"
#include "editor/editor_node.h"
#include "scene/resources/packed_scene.h"

View file

@ -30,6 +30,7 @@
#include "bit_map_editor_plugin.h"
#include "core/object/callable_method_pointer.h"
#include "editor/editor_string_names.h"
#include "editor/themes/editor_scale.h"
#include "scene/gui/aspect_ratio_container.h"

View file

@ -39,6 +39,7 @@
#include "scene/gui/item_list.h"
#include "scene/gui/split_container.h"
#include "servers/display/display_server.h"
#include "servers/rendering/rendering_device_binds.h"
/*** SHADER SCRIPT EDITOR ****/

View file

@ -33,10 +33,11 @@
#include "editor/docks/editor_dock.h"
#include "editor/plugins/editor_plugin.h"
#include "scene/gui/rich_text_label.h"
#include "servers/rendering/rendering_device_binds.h"
#include "servers/rendering/rendering_device.h"
class HFlowContainer;
class ItemList;
class RDShaderFile;
class ShaderFileEditor : public EditorDock {
GDCLASS(ShaderFileEditor, EditorDock);

View file

@ -30,6 +30,7 @@
#include "editor_translation_preview_button.h"
#include "core/object/callable_method_pointer.h"
#include "core/string/translation_server.h"
#include "editor/editor_node.h"

View file

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

View file

@ -42,6 +42,7 @@
#include "servers/display/display_server.h"
#include "servers/rendering/rendering_context_driver.h"
#include "servers/rendering/rendering_device.h"
#include "servers/rendering/rendering_device_binds.h"
#include "servers/rendering/rendering_server.h"
#if defined(VULKAN_ENABLED)

View file

@ -33,8 +33,8 @@
#include "core/io/image.h"
#include "core/object/worker_thread_pool.h"
#include "core/templates/command_queue_mt.h"
#include "servers/rendering/rendering_device_binds.h" // RDShaderFile
class RDShaderFile;
class RenderingDevice;
class RenderingContextDriver;

View file

@ -32,6 +32,8 @@
#include "csg_shape.h"
#include "core/object/class_db.h"
#ifdef TOOLS_ENABLED
#include "editor/csg_gizmos.h"
#endif

View file

@ -33,6 +33,7 @@
#include "image_saver_dds.h"
#include "texture_loader_dds.h"
#include "core/object/class_db.h"
#include "scene/resources/texture.h"
static Ref<ResourceFormatDDS> resource_loader_dds;

View file

@ -34,6 +34,7 @@
#include "core/io/file_access.h"
#include "core/io/file_access_memory.h"
#include "core/object/class_db.h"
#include "scene/resources/image_texture.h"
DDSFormat _dxgi_to_dds_format(uint32_t p_dxgi_format) {

View file

@ -31,6 +31,7 @@
#include "gdscript_byte_codegen.h"
#include "core/debugger/engine_debugger.h"
#include "core/object/class_db.h"
uint32_t GDScriptByteCodeGenerator::add_parameter(const StringName &p_name, bool p_is_optional, const GDScriptDataType &p_type) {
function->_argument_count++;

View file

@ -38,6 +38,7 @@
#include "core/config/engine.h"
#include "core/config/project_settings.h"
#include "core/object/class_db.h"
#include "scene/scene_string_names.h"

View file

@ -33,6 +33,7 @@
#include "gdscript.h"
#include "gdscript_function.h"
#include "core/object/class_db.h"
#include "core/string/string_builder.h"
static String _get_variant_string(const Variant &p_variant) {

View file

@ -44,6 +44,7 @@
#include "core/core_constants.h"
#include "core/io/file_access.h"
#include "core/math/expression.h"
#include "core/object/class_db.h"
#include "core/variant/container_type_validate.h"
#ifdef TOOLS_ENABLED

View file

@ -34,6 +34,123 @@
#include "core/object/class_db.h"
bool GDScriptDataType::is_type(const Variant &p_variant, bool p_allow_implicit_conversion) const {
switch (kind) {
case VARIANT: {
return true;
} break;
case BUILTIN: {
Variant::Type var_type = p_variant.get_type();
bool valid = builtin_type == var_type;
if (valid && builtin_type == Variant::ARRAY && has_container_element_type(0)) {
Array array = p_variant;
if (array.is_typed()) {
const GDScriptDataType &elem_type = container_element_types[0];
Variant::Type array_builtin_type = (Variant::Type)array.get_typed_builtin();
StringName array_native_type = array.get_typed_class_name();
Ref<Script> array_script_type_ref = array.get_typed_script();
if (array_script_type_ref.is_valid()) {
valid = (elem_type.kind == SCRIPT || elem_type.kind == GDSCRIPT) && elem_type.script_type == array_script_type_ref.ptr();
} else if (array_native_type != StringName()) {
valid = elem_type.kind == NATIVE && elem_type.native_type == array_native_type;
} else {
valid = elem_type.kind == BUILTIN && elem_type.builtin_type == array_builtin_type;
}
} else {
valid = false;
}
} else if (valid && builtin_type == Variant::DICTIONARY && has_container_element_types()) {
Dictionary dictionary = p_variant;
if (dictionary.is_typed()) {
if (dictionary.is_typed_key()) {
GDScriptDataType key = get_container_element_type_or_variant(0);
Variant::Type key_builtin_type = (Variant::Type)dictionary.get_typed_key_builtin();
StringName key_native_type = dictionary.get_typed_key_class_name();
Ref<Script> key_script_type_ref = dictionary.get_typed_key_script();
if (key_script_type_ref.is_valid()) {
valid = (key.kind == SCRIPT || key.kind == GDSCRIPT) && key.script_type == key_script_type_ref.ptr();
} else if (key_native_type != StringName()) {
valid = key.kind == NATIVE && key.native_type == key_native_type;
} else {
valid = key.kind == BUILTIN && key.builtin_type == key_builtin_type;
}
}
if (valid && dictionary.is_typed_value()) {
GDScriptDataType value = get_container_element_type_or_variant(1);
Variant::Type value_builtin_type = (Variant::Type)dictionary.get_typed_value_builtin();
StringName value_native_type = dictionary.get_typed_value_class_name();
Ref<Script> value_script_type_ref = dictionary.get_typed_value_script();
if (value_script_type_ref.is_valid()) {
valid = (value.kind == SCRIPT || value.kind == GDSCRIPT) && value.script_type == value_script_type_ref.ptr();
} else if (value_native_type != StringName()) {
valid = value.kind == NATIVE && value.native_type == value_native_type;
} else {
valid = value.kind == BUILTIN && value.builtin_type == value_builtin_type;
}
}
} else {
valid = false;
}
} else if (!valid && p_allow_implicit_conversion) {
valid = Variant::can_convert_strict(var_type, builtin_type);
}
return valid;
} break;
case NATIVE: {
if (p_variant.get_type() == Variant::NIL) {
return true;
}
if (p_variant.get_type() != Variant::OBJECT) {
return false;
}
bool was_freed = false;
Object *obj = p_variant.get_validated_object_with_check(was_freed);
if (!obj) {
return !was_freed;
}
if (!ClassDB::is_parent_class(obj->get_class_name(), native_type)) {
return false;
}
return true;
} break;
case SCRIPT:
case GDSCRIPT: {
if (p_variant.get_type() == Variant::NIL) {
return true;
}
if (p_variant.get_type() != Variant::OBJECT) {
return false;
}
bool was_freed = false;
Object *obj = p_variant.get_validated_object_with_check(was_freed);
if (!obj) {
return !was_freed;
}
Ref<Script> base = obj && obj->get_script_instance() ? obj->get_script_instance()->get_script() : nullptr;
bool valid = false;
while (base.is_valid()) {
if (base == script_type) {
valid = true;
break;
}
base = base->get_base_script();
}
return valid;
} break;
}
return false;
}
/////////////////////
Variant GDScriptFunction::get_constant(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, constants.size(), "<errconst>");
return constants[p_idx];

View file

@ -64,120 +64,7 @@ public:
_FORCE_INLINE_ bool has_type() const { return kind != VARIANT; }
bool is_type(const Variant &p_variant, bool p_allow_implicit_conversion = false) const {
switch (kind) {
case VARIANT: {
return true;
} break;
case BUILTIN: {
Variant::Type var_type = p_variant.get_type();
bool valid = builtin_type == var_type;
if (valid && builtin_type == Variant::ARRAY && has_container_element_type(0)) {
Array array = p_variant;
if (array.is_typed()) {
const GDScriptDataType &elem_type = container_element_types[0];
Variant::Type array_builtin_type = (Variant::Type)array.get_typed_builtin();
StringName array_native_type = array.get_typed_class_name();
Ref<Script> array_script_type_ref = array.get_typed_script();
if (array_script_type_ref.is_valid()) {
valid = (elem_type.kind == SCRIPT || elem_type.kind == GDSCRIPT) && elem_type.script_type == array_script_type_ref.ptr();
} else if (array_native_type != StringName()) {
valid = elem_type.kind == NATIVE && elem_type.native_type == array_native_type;
} else {
valid = elem_type.kind == BUILTIN && elem_type.builtin_type == array_builtin_type;
}
} else {
valid = false;
}
} else if (valid && builtin_type == Variant::DICTIONARY && has_container_element_types()) {
Dictionary dictionary = p_variant;
if (dictionary.is_typed()) {
if (dictionary.is_typed_key()) {
GDScriptDataType key = get_container_element_type_or_variant(0);
Variant::Type key_builtin_type = (Variant::Type)dictionary.get_typed_key_builtin();
StringName key_native_type = dictionary.get_typed_key_class_name();
Ref<Script> key_script_type_ref = dictionary.get_typed_key_script();
if (key_script_type_ref.is_valid()) {
valid = (key.kind == SCRIPT || key.kind == GDSCRIPT) && key.script_type == key_script_type_ref.ptr();
} else if (key_native_type != StringName()) {
valid = key.kind == NATIVE && key.native_type == key_native_type;
} else {
valid = key.kind == BUILTIN && key.builtin_type == key_builtin_type;
}
}
if (valid && dictionary.is_typed_value()) {
GDScriptDataType value = get_container_element_type_or_variant(1);
Variant::Type value_builtin_type = (Variant::Type)dictionary.get_typed_value_builtin();
StringName value_native_type = dictionary.get_typed_value_class_name();
Ref<Script> value_script_type_ref = dictionary.get_typed_value_script();
if (value_script_type_ref.is_valid()) {
valid = (value.kind == SCRIPT || value.kind == GDSCRIPT) && value.script_type == value_script_type_ref.ptr();
} else if (value_native_type != StringName()) {
valid = value.kind == NATIVE && value.native_type == value_native_type;
} else {
valid = value.kind == BUILTIN && value.builtin_type == value_builtin_type;
}
}
} else {
valid = false;
}
} else if (!valid && p_allow_implicit_conversion) {
valid = Variant::can_convert_strict(var_type, builtin_type);
}
return valid;
} break;
case NATIVE: {
if (p_variant.get_type() == Variant::NIL) {
return true;
}
if (p_variant.get_type() != Variant::OBJECT) {
return false;
}
bool was_freed = false;
Object *obj = p_variant.get_validated_object_with_check(was_freed);
if (!obj) {
return !was_freed;
}
if (!ClassDB::is_parent_class(obj->get_class_name(), native_type)) {
return false;
}
return true;
} break;
case SCRIPT:
case GDSCRIPT: {
if (p_variant.get_type() == Variant::NIL) {
return true;
}
if (p_variant.get_type() != Variant::OBJECT) {
return false;
}
bool was_freed = false;
Object *obj = p_variant.get_validated_object_with_check(was_freed);
if (!obj) {
return !was_freed;
}
Ref<Script> base = obj && obj->get_script_instance() ? obj->get_script_instance()->get_script() : nullptr;
bool valid = false;
while (base.is_valid()) {
if (base == script_type) {
valid = true;
break;
}
base = base->get_base_script();
}
return valid;
} break;
}
return false;
}
bool is_type(const Variant &p_variant, bool p_allow_implicit_conversion = false) const;
bool can_contain_object() const {
if (kind == BUILTIN) {

View file

@ -32,6 +32,7 @@
#include "gdscript_function.h"
#include "gdscript_lambda_callable.h"
#include "core/object/class_db.h"
#include "core/os/os.h"
#include "core/profiling/profiling.h"

View file

@ -52,6 +52,7 @@
#include "core/io/file_access.h"
#include "core/io/resource_loader.h"
#include "core/object/class_db.h"
#ifdef TOOLS_ENABLED
#include "editor/editor_node.h"

View file

@ -40,6 +40,7 @@
#include "core/core_globals.h"
#include "core/io/dir_access.h"
#include "core/io/file_access_pack.h"
#include "core/object/class_db.h"
#include "core/os/os.h"
#include "core/string/string_builder.h"
#include "scene/resources/packed_scene.h"

View file

@ -31,6 +31,7 @@
#include "editor_import_blend_runner.h"
#include "core/io/http_client.h"
#include "core/object/callable_method_pointer.h"
#include "editor/editor_node.h"
#include "editor/file_system/editor_file_system.h"
#include "editor/settings/editor_settings.h"

View file

@ -31,6 +31,8 @@
#include "register_types.h"
#include "godot_physics_server_3d.h"
#include "core/object/callable_method_pointer.h"
#include "servers/physics_3d/physics_server_3d.h"
#include "servers/physics_3d/physics_server_3d_wrap_mt.h"

View file

@ -34,6 +34,7 @@
#include "jolt_physics_server_3d.h"
#include "jolt_project_settings.h"
#include "core/object/callable_method_pointer.h"
#include "servers/physics_3d/physics_server_3d_wrap_mt.h"
PhysicsServer3D *create_jolt_physics_server() {

View file

@ -32,6 +32,7 @@
#include "texture_loader_ktx.h"
#include "core/object/class_db.h"
#include "scene/resources/image_texture.h"
static Ref<ResourceFormatKTX> resource_loader_ktx;

View file

@ -32,6 +32,7 @@
#include "core/io/file_access.h"
#include "core/io/file_access_memory.h"
#include "core/object/class_db.h"
#include "scene/resources/image_texture.h"
#include "scene/resources/texture.h"
#include "servers/rendering/rendering_server.h"

View file

@ -33,6 +33,7 @@
#include "lightmapper_rd.h"
#include "core/config/project_settings.h"
#include "core/object/class_db.h"
#include "scene/3d/lightmapper.h"
#ifndef _3D_DISABLED

View file

@ -33,6 +33,7 @@
#include "core/io/certs_compressed.gen.h"
#include "core/io/compression.h"
#include "core/io/file_access.h"
#include "core/object/class_db.h"
#include "core/os/os.h"
#include <mbedtls/debug.h>

View file

@ -31,6 +31,7 @@
#include "stream_peer_mbedtls.h"
#include "core/io/stream_peer_tcp.h"
#include "core/object/class_db.h"
int StreamPeerMbedTLS::bio_send(void *ctx, const unsigned char *buf, size_t len) {
if (buf == nullptr || len == 0) {

View file

@ -31,6 +31,7 @@
#include "code_completion.h"
#include "core/config/project_settings.h"
#include "core/object/class_db.h"
#include "core/object/script_language.h"
#include "editor/file_system/editor_file_system.h"
#include "editor/settings/editor_settings.h"

View file

@ -38,6 +38,10 @@
#include "../utils/path_utils.h"
#include "gd_mono_cache.h"
#ifdef DEBUG_ENABLED
#include "core/object/class_db.h"
#endif
#ifdef TOOLS_ENABLED
#include "../editor/hostfxr_resolver.h"
#include "../editor/semver.h"
@ -741,6 +745,23 @@ void GDMono::_init_godot_api_hashes() {
#endif // DEBUG_ENABLED
}
#ifdef DEBUG_ENABLED
uint64_t GDMono::get_api_core_hash() {
if (api_core_hash == 0) {
api_core_hash = ClassDB::get_api_hash(ClassDB::API_CORE);
}
return api_core_hash;
}
#ifdef TOOLS_ENABLED
uint64_t GDMono::get_api_editor_hash() {
if (api_editor_hash == 0) {
api_editor_hash = ClassDB::get_api_hash(ClassDB::API_EDITOR);
}
return api_editor_hash;
}
#endif // TOOLS_ENABLED
#endif // DEBUG_ENABLED
#ifdef TOOLS_ENABLED
bool GDMono::_load_project_assembly() {
String assembly_name = Path::get_csharp_project_name();

View file

@ -93,19 +93,9 @@ protected:
public:
#ifdef DEBUG_ENABLED
uint64_t get_api_core_hash() {
if (api_core_hash == 0) {
api_core_hash = ClassDB::get_api_hash(ClassDB::API_CORE);
}
return api_core_hash;
}
uint64_t get_api_core_hash();
#ifdef TOOLS_ENABLED
uint64_t get_api_editor_hash() {
if (api_editor_hash == 0) {
api_editor_hash = ClassDB::get_api_hash(ClassDB::API_EDITOR);
}
return api_editor_hash;
}
uint64_t get_api_editor_hash();
#endif // TOOLS_ENABLED
#endif // DEBUG_ENABLED

View file

@ -33,6 +33,7 @@
#include "csharp_script.h"
#include "core/config/engine.h"
#include "core/object/class_db.h"
CSharpLanguage *script_language_cs = nullptr;
Ref<ResourceFormatLoaderCSharpScript> resource_loader_cs;

View file

@ -33,6 +33,7 @@
#include "../noise.h"
#include "../noise_texture_2d.h"
#include "core/object/callable_method_pointer.h"
#include "editor/inspector/editor_inspector.h"
#include "editor/themes/editor_scale.h"
#include "scene/gui/button.h"

View file

@ -35,6 +35,8 @@
#include "noise_texture_2d.h"
#include "noise_texture_3d.h"
#include "core/object/class_db.h"
#ifdef TOOLS_ENABLED
#include "editor/noise_editor_plugin.h"
#endif

View file

@ -32,6 +32,7 @@
#include "shared_controls.h"
#include "core/object/class_db.h"
#include "editor/editor_node.h"
#include "editor/themes/editor_scale.h"
#include "scene/gui/split_container.h"

View file

@ -32,6 +32,8 @@
#include "objectdb_profiler_panel.h"
#include "core/object/callable_method_pointer.h"
bool ObjectDBProfilerDebuggerPlugin::has_capture(const String &p_capture) const {
return p_capture == "snapshot";
}

View file

@ -32,6 +32,8 @@
#include "ogg_packet_sequence.h"
#include "core/object/class_db.h"
void initialize_ogg_module(ModuleInitializationLevel p_level) {
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
return;

View file

@ -32,6 +32,8 @@
#include "text_server_adv.h"
#include "core/object/class_db.h"
void initialize_text_server_adv_module(ModuleInitializationLevel p_level) {
if (p_level != MODULE_INITIALIZATION_LEVEL_SERVERS) {
return;

View file

@ -30,6 +30,8 @@
#include "text_server_adv.h"
#include "core/object/callable_method_pointer.h"
#ifdef GDEXTENSION
// Headers for building as GDExtension plug-in.

View file

@ -32,6 +32,8 @@
#include "text_server_fb.h"
#include "core/object/class_db.h"
void initialize_text_server_fb_module(ModuleInitializationLevel p_level) {
if (p_level != MODULE_INITIALIZATION_LEVEL_SERVERS) {
return;

View file

@ -30,6 +30,8 @@
#include "text_server_fb.h"
#include "core/object/callable_method_pointer.h"
#ifdef GDEXTENSION
// Headers for building as GDExtension plug-in.

View file

@ -32,6 +32,8 @@
#include "video_stream_theora.h"
#include "core/object/class_db.h"
#ifdef TOOLS_ENABLED
#include "editor/movie_writer_ogv.h"
#endif

View file

@ -31,6 +31,7 @@
#ifdef ANDROID_ENABLED
#include "android_editor_gradle_runner.h"
#include "core/object/callable_method_pointer.h"
#include "editor/editor_interface.h"
#include "editor/settings/editor_settings.h"
#include "scene/gui/dialogs.h"

View file

@ -66,6 +66,10 @@
#include "android_editor_gradle_runner.h"
#endif
#ifndef ANDROID_ENABLED
#include "core/object/callable_method_pointer.h"
#endif
static const char *ANDROID_PERMS[] = {
"ACCESS_CHECKIN_PROPERTIES",
"ACCESS_COARSE_LOCATION",

View file

@ -47,6 +47,7 @@
#include "drivers/unix/dir_access_unix.h"
#include "drivers/unix/file_access_unix.h"
#ifdef TOOLS_ENABLED
#include "core/object/callable_method_pointer.h"
#include "editor/editor_node.h"
#include "editor/run/game_view_plugin.h"
#endif

View file

@ -32,6 +32,7 @@
#include "export_plugin.h"
#include "core/object/class_db.h"
#include "editor/export/editor_export.h"
void register_ios_exporter_types() {

View file

@ -32,6 +32,7 @@
#include "export_plugin.h"
#include "core/object/class_db.h"
#include "editor/export/editor_export.h"
void register_linuxbsd_exporter_types() {

View file

@ -34,6 +34,7 @@
#include "core/crypto/crypto_core.h"
#include "core/error/error_macros.h"
#include "core/object/callable_method_pointer.h"
#include "core/os/os.h"
#include "core/string/ustring.h"
#include "core/variant/variant.h"

View file

@ -31,6 +31,7 @@
#include "tts_linux.h"
#include "core/config/project_settings.h"
#include "core/object/callable_method_pointer.h"
#include "servers/text/text_server.h"
TTS_Linux *TTS_Linux::singleton = nullptr;

View file

@ -38,6 +38,7 @@
#include "core/input/input.h"
#include "core/io/file_access.h"
#include "core/math/math_funcs.h"
#include "core/object/callable_method_pointer.h"
#include "core/os/main_loop.h"
#include "core/string/print_string.h"
#include "core/string/ustring.h"

View file

@ -55,6 +55,7 @@
#include "core/io/file_access.h"
#include "core/io/marshalls.h"
#include "core/math/geometry_2d.h"
#include "core/object/callable_method_pointer.h"
#include "core/os/keyboard.h"
#include "core/os/main_loop.h"
#include "drivers/png/png_driver_common.h"

View file

@ -32,6 +32,8 @@
#include "export_plugin.h"
#include "core/object/class_db.h"
void register_macos_exporter_types() {
GDREGISTER_VIRTUAL_CLASS(EditorExportPlatformMacOS);
}

View file

@ -35,6 +35,7 @@
#include "core/io/image_loader.h"
#include "core/io/plist.h"
#include "core/object/class_db.h"
#include "core/string/translation_server.h"
#include "drivers/png/png_driver_common.h"
#include "editor/editor_node.h"

View file

@ -34,6 +34,7 @@
#import "godot_menu_item.h"
#import "key_mapping_macos.h"
#include "core/object/callable_method_pointer.h"
#include "scene/resources/image_texture.h"
void NativeMenuMacOS::_register_system_menus(NSMenu *p_main_menu, NSMenu *p_application_menu, NSMenu *p_window_menu, NSMenu *p_help_menu, NSMenu *p_dock_menu) {

View file

@ -32,6 +32,7 @@
#include "export_plugin.h"
#include "core/object/class_db.h"
#include "editor/export/editor_export.h"
void register_visionos_exporter_types() {

View file

@ -42,6 +42,10 @@
#include "servers/display/native_menu.h"
#include "servers/rendering/dummy/rasterizer_dummy.h"
#ifdef PROXY_TO_PTHREAD_ENABLED
#include "core/object/callable_method_pointer.h"
#endif
#ifdef GLES3_ENABLED
#include "drivers/gles3/rasterizer_gles3.h"
#endif

View file

@ -34,6 +34,7 @@
#include "core/config/project_settings.h"
#include "core/io/dir_access.h"
#include "core/io/file_access.h"
#include "core/object/callable_method_pointer.h"
#include "core/os/time.h"
#include "editor/editor_node.h"
#include "editor/export/project_zip_packer.h"

View file

@ -30,6 +30,8 @@
#include "http_client_web.h"
#include "core/object/class_db.h"
void HTTPClientWeb::_parse_headers(int p_len, const char **p_headers, void *p_ref) {
HTTPClientWeb *client = static_cast<HTTPClientWeb *>(p_ref);
for (int i = 0; i < p_len; i++) {

View file

@ -34,6 +34,10 @@
#include <emscripten.h>
#ifdef PROXY_TO_PTHREAD_ENABLED
#include "core/object/callable_method_pointer.h"
#endif
extern "C" {
extern void godot_js_os_download_buffer(const uint8_t *p_buf, int p_buf_size, const char *p_name, const char *p_mime);
}

View file

@ -40,6 +40,7 @@
#include "core/io/file_access.h"
#include "core/io/marshalls.h"
#include "core/io/xml_parser.h"
#include "core/object/callable_method_pointer.h"
#include "core/os/main_loop.h"
#include "core/version.h"
#include "drivers/png/png_driver_common.h"

View file

@ -32,6 +32,7 @@
#include "export_plugin.h"
#include "core/object/class_db.h"
#include "editor/export/editor_export.h"
void register_windows_exporter_types() {

View file

@ -31,6 +31,7 @@
#include "color_picker_shape.h"
#include "core/input/input.h"
#include "core/object/callable_method_pointer.h"
#include "scene/gui/margin_container.h"
#include "scene/resources/material.h"
#include "servers/rendering/rendering_server.h"

View file

@ -32,6 +32,7 @@
#include "core/config/engine.h"
#include "core/io/resource_loader.h"
#include "core/object/class_db.h"
#include "core/object/script_language.h"
#include "core/templates/local_vector.h"
#include "scene/resources/packed_scene.h"

View file

@ -30,6 +30,7 @@
#pragma once
#include "core/os/rw_lock.h"
#include "scene/resources/texture.h"
class AnimatedTexture : public Texture2D {

View file

@ -33,6 +33,7 @@
#include "core/config/project_settings.h"
#include "core/io/dir_access.h"
#include "core/io/missing_resource.h"
#include "core/object/class_db.h"
#include "core/object/script_language.h"
#include "scene/property_utils.h"

View file

@ -30,6 +30,7 @@
#include "theme_owner.h"
#include "core/object/callable_method_pointer.h"
#include "scene/gui/control.h"
#include "scene/main/window.h"
#include "scene/theme/theme_db.h"

View file

@ -30,6 +30,8 @@
#include "physics_server_3d_wrap_mt.h"
#include "core/object/callable_method_pointer.h"
void PhysicsServer3DWrapMT::_assign_mt_ids(WorkerThreadPool::TaskID p_pump_task_id) {
server_thread = Thread::get_caller_id();
server_task_id = p_pump_task_id;

View file

@ -31,6 +31,7 @@
#include "framebuffer_cache_rd.h"
#include "core/object/class_db.h"
#include "servers/rendering/rendering_device_binds.h"
FramebufferCacheRD *FramebufferCacheRD::singleton = nullptr;

View file

@ -33,7 +33,6 @@
#include "core/templates/local_vector.h"
#include "core/templates/paged_allocator.h"
#include "servers/rendering/rendering_device.h"
#include "servers/rendering/rendering_device_binds.h"
class FramebufferCacheRD : public Object {
GDCLASS(FramebufferCacheRD, Object)

Some files were not shown because too many files have changed in this diff Show more