From e36e8591bf051f045db1625a98824e6f9c1f1983 Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Tue, 4 Feb 2025 12:04:54 -0500 Subject: [PATCH 1/7] GH-868 Bump godot-engine/godot-cpp to 4.4.beta2 --- CMakeLists.txt | 50 ++++--- cmake/cmake-utils.cmake | 2 +- cmake/godot-dev-configuration.cmake | 2 + extern/godot-cpp | 2 +- extern/godot-engine | 2 +- .../orchestrator/orchestrator.gdextension | 22 ++-- project/project.godot | 2 +- src/api/extension_db.cpp | 122 +++++++++++++----- .../serialization/text_loader_instance.cpp | 6 +- 9 files changed, 134 insertions(+), 76 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 58171773..dd1b852e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,8 +52,7 @@ ENDIF () # Setup the CMAKE_MODULE_PATH LIST(APPEND CMAKE_MODULE_PATH - "${CMAKE_CURRENT_SOURCE_DIR}/cmake/" - "${CMAKE_CURRENT_SOURCE_DIR}/extern/godot-cpp/cmake/") + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") # Include and execute various CMAKE modules INCLUDE(generate-authors) @@ -61,7 +60,6 @@ INCLUDE(generate-license) INCLUDE(generate-version) INCLUDE(generate-donors) INCLUDE(godot-extension-db-generator) -INCLUDE(godot-docs-generator) # Generation steps GENERATE_AUTHORS() @@ -69,7 +67,6 @@ GENERATE_LICENSE() GENERATE_VERSION() GENERATE_DONORS() GENERATE_GODOT_EXTENSION_DB() -GENERATE_GODOT_DOCUMENTATION() # Configure project PROJECT("${GDEXTENSION_LIB_NAME}" LANGUAGES C CXX VERSION ${RESOLVED_VERSION}) @@ -83,9 +80,6 @@ IF (WIN32) CONFIGURE_FILE(cmake/templates/windows.rc.in ${CMAKE_CURRENT_BINARY_DIR}/_generated/version.rc @ONLY) ENDIF () -# Orchestrator is an editor plug-in, force TOOLS_ENABLED -ADD_COMPILE_DEFINITIONS(TOOLS_ENABLED) - # MacOS universal binary support IF (APPLE) SET(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Build architectures for OSX" FORCE) @@ -99,6 +93,11 @@ SET(compiler_is_msvc "$") # Configure godot-cpp - a statically linked library to this project. INCLUDE(godot-dev-configuration) +# Generate Doc Data +file( GLOB_RECURSE DOC_XML LIST_DIRECTORIES NO CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/doc_classes/*.xml" ) +SET(DOC_DATA_CPP_FILE "${CMAKE_BINARY_DIR}/_generated/doc_data.cpp") +generate_doc_source( "${DOC_DATA_CPP_FILE}" "${DOC_XML}" ) + # Library sources FILE(GLOB_RECURSE gdext_sources CONFIGURE_DEPENDS @@ -106,15 +105,13 @@ FILE(GLOB_RECURSE gdext_sources "${CMAKE_CURRENT_SOURCE_DIR}/src/*.[hc]pp" # Includes the generated doc data from /doc_classes "${CMAKE_BINARY_DIR}/_generated/*.cpp" + "${DOC_DATA_CPP_FILE}" # Include windows version resource, if exists "${CMAKE_CURRENT_BINARY_DIR}/_generated/version.rc") # GDExtension library ADD_LIBRARY(${PROJECT_NAME} SHARED ${gdext_sources}) -## Import compiler warnings from godot-cpp -INCLUDE(GodotCompilerWarnings) - # Setup compiler options for GDExtension Library based on the compiler used TARGET_COMPILE_OPTIONS(${PROJECT_NAME} PUBLIC $<${compiler_is_msvc}: @@ -126,7 +123,7 @@ TARGET_COMPILE_OPTIONS(${PROJECT_NAME} PUBLIC /MDd > $<$: - /MD + /MT /O2 > > @@ -180,26 +177,23 @@ IF (AUTOFORMAT_SRC_ON_CONFIGURE MATCHES ON) ENDIF () # Dependency linking -TARGET_LINK_LIBRARIES(${PROJECT_NAME} PUBLIC godot::cpp) +TARGET_LINK_LIBRARIES(${PROJECT_NAME} PUBLIC godot-cpp.editor) SET(GDEXTENSION_LIB_PREFIX "") -IF (NOT ANDROID) - IF (CMAKE_SIZEOF_VOID_P EQUAL 8) - SET(system_bits 64) - ELSE () - SET(system_bits 32) - ENDIF () -ELSE () - SET(GDEXTENSION_LIB_PREFIX "lib") - IF (CMAKE_ANDROID_ARCH STREQUAL "arm64") - SET(system_bits 64) - ELSE () - SET(system_bits 32) - ENDIF () -ENDIF () +### Get useful properties of the library +get_target_property( GODOT_PLATFORM godot-cpp::editor GODOT_PLATFORM ) +get_target_property( GODOT_TARGET godot-cpp::editor GODOT_TARGET ) +get_target_property( GODOT_ARCH godot-cpp::editor GODOT_ARCH ) + +# Converts GODOT_ARCH to the old system bits for unchanged file names. +IF (GODOT_ARCH STREQUAL "x86_64") + SET(ORCHESTRATOR_ARCH "64") +ELSE() + SET(ORCHESTRATOR_ARCH "32") +ENDIF() -STRING(TOLOWER "${PROJECT_NAME}.${CMAKE_SYSTEM_NAME}.${system_bits}.${CMAKE_BUILD_TYPE}" GDEXTENSION_LIB_NAME) +# STRING(TOLOWER ${PROJECT_NAME}.${GODOT_PLATFORM}.${ORCHESTRATOR_ARCH}.$> GDEXTENSION_LIB_NAME) SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES @@ -212,7 +206,7 @@ SET_TARGET_PROPERTIES(${PROJECT_NAME} RUNTIME_OUTPUT_DIRECTORY "${GDEXTENSION_LIB_PATH}" CMAKE_PDB_OUTPUT_DIRECTORY "${GDEXTENSION_LIB_PATH}" CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY "${GDEXTENSION_LIB_PATH}" - OUTPUT_NAME "${GDEXTENSION_LIB_NAME}") + OUTPUT_NAME "${PROJECT_NAME}.${GODOT_PLATFORM}.${ORCHESTRATOR_ARCH}.$>") INCLUDE(cmake-utils) diff --git a/cmake/cmake-utils.cmake b/cmake/cmake-utils.cmake index 774a13cb..97c792a9 100644 --- a/cmake/cmake-utils.cmake +++ b/cmake/cmake-utils.cmake @@ -108,7 +108,7 @@ FUNCTION( PRINT_PROJECT_VARIABLES ) MESSAGE( NOTICE " CMAKE_MINIMUM_REQUIRED_VERSION:..........: " ${CMAKE_MINIMUM_REQUIRED_VERSION} ) MESSAGE( NOTICE " VCPKG_TARGET_TRIPLET.....................: " ${VCPKG_TARGET_TRIPLET} ) MESSAGE( NOTICE " CMAKE_DEBUG_POSTFIX......................: " ${CMAKE_DEBUG_POSTFIX} ) - MESSAGE( NOTICE " system_bits..............................: " ${system_bits} ) + MESSAGE( NOTICE " ORCHESTRATOR_ARCH........................: " ${ORCHESTRATOR_ARCH} ) MESSAGE( NOTICE " GDEXTENSION_LIB_NAME.....................: " ${GDEXTENSION_LIB_NAME} ) MESSAGE( NOTICE " RESOLVED_VERSION.........................: " ${RESOLVED_VERSION} ) MESSAGE( NOTICE " GIT_COMMIT_HASH..........................: " ${GIT_COMMIT_HASH} ) diff --git a/cmake/godot-dev-configuration.cmake b/cmake/godot-dev-configuration.cmake index 19b034b8..aaf775d1 100644 --- a/cmake/godot-dev-configuration.cmake +++ b/cmake/godot-dev-configuration.cmake @@ -144,6 +144,8 @@ ENDIF () # Godot C++ bindings library setup/configuration # ======================================================================= +# SET( GODOT_BUILD_PROFILE "${CMAKE_SOURCE_DIR}/extern/godot-cpp-profile.json" ) + ADD_SUBDIRECTORY( ${CMAKE_CURRENT_SOURCE_DIR}/extern/godot-cpp ) # ======================================================================= diff --git a/extern/godot-cpp b/extern/godot-cpp index fbbf9ec4..f06af65c 160000 --- a/extern/godot-cpp +++ b/extern/godot-cpp @@ -1 +1 @@ -Subproject commit fbbf9ec4efd8f1055d00edb8d926eef8ba4c2cce +Subproject commit f06af65c87b72db473bc413f23ee9fcabe61b794 diff --git a/extern/godot-engine b/extern/godot-engine index 77dcf97d..a013481b 160000 --- a/extern/godot-engine +++ b/extern/godot-engine @@ -1 +1 @@ -Subproject commit 77dcf97d82cbfe4e4615475fa52ca03da645dbd8 +Subproject commit a013481b0911e59cc3f3dea7ebb732450c3e1460 diff --git a/project/addons/orchestrator/orchestrator.gdextension b/project/addons/orchestrator/orchestrator.gdextension index c5f82326..8e36f115 100644 --- a/project/addons/orchestrator/orchestrator.gdextension +++ b/project/addons/orchestrator/orchestrator.gdextension @@ -1,22 +1,22 @@ [configuration] entry_symbol = "extension_library_init" -compatibility_minimum="4.3" +compatibility_minimum="4.4" reloadable = false [libraries] -linux.x86_64 = "res://addons/orchestrator/orchestrator.linux.64.release.so" -#linux.debug.x86_64 = "res://addons/orchestrator/orchestrator.linux.64.debug.so" +linux.x86_64 = "res://addons/orchestrator/orchestrator.linux.x86_64.release.so" +#linux.debug.x86_64 = "res://addons/orchestrator/orchestrator.linux.x86_64.debug.so" -macos = "res://addons/orchestrator/orchestrator.darwin.64.release.dylib" -#macos.debug = "res://addons/orchestrator/orchestrator.darwin.64.debug.dylib" +macos = "res://addons/orchestrator/orchestrator.darwin.x86_64.release.dylib" +#macos.debug = "res://addons/orchestrator/orchestrator.darwin.x86_64.debug.dylib" -windows.x86_64 = "res://addons/orchestrator/orchestrator.windows.64.release.dll" -#windows.debug.x86_64 = "res://addons/orchestrator/orchestrator.windows.64.debug.dll" +windows.x86_64 = "res://addons/orchestrator/orchestrator.windows.x86_64.release.dll" +#windows.debug.x86_64 = "res://addons/orchestrator/orchestrator.windows.x86_64.debug.dll" -android.arm32 = "res://addons/orchestrator/liborchestrator.android.32.release.so" -#android.debug.arm32 = "res://addons/orchestrator/liborchestrator.android.32.debug.so" +android.arm32 = "res://addons/orchestrator/liborchestrator.android.x86_32.release.so" +#android.debug.arm32 = "res://addons/orchestrator/liborchestrator.android.x86_32.debug.so" -android.arm64 = "res://addons/orchestrator/liborchestrator.android.64.release.so" -#android.debug.arm64 = "res://addons/orchestrator/liborchestrator.android.64.debug.so" +android.arm64 = "res://addons/orchestrator/liborchestrator.android.x86_64.release.so" +#android.debug.arm64 = "res://addons/orchestrator/liborchestrator.android.x86_64.debug.so" diff --git a/project/project.godot b/project/project.godot index 4e3fb405..e9fdaeca 100644 --- a/project/project.godot +++ b/project/project.godot @@ -12,7 +12,7 @@ config_version=5 config/name="Orchestrator GDExtension" run/main_scene="res://scenes/world_3d/world_3d.tscn" -config/features=PackedStringArray("4.3", "Forward Plus") +config/features=PackedStringArray("4.4", "Forward Plus") config/icon="res://icon.svg" [doc_classes] diff --git a/src/api/extension_db.cpp b/src/api/extension_db.cpp index 09706043..5cc1e4c3 100644 --- a/src/api/extension_db.cpp +++ b/src/api/extension_db.cpp @@ -454,7 +454,7 @@ namespace godot ei.name = "KeyModifierMask"; ei.is_bitfield = true; ei.values.push_back({ "KEY_CODE_MASK", "", 8388607 }); - ei.values.push_back({ "KEY_MODIFIER_MASK", "", 532676608 }); + ei.values.push_back({ "KEY_MODIFIER_MASK", "", 2130706432 }); ei.values.push_back({ "KEY_MASK_CMD_OR_CTRL", "", 16777216 }); ei.values.push_back({ "KEY_MASK_SHIFT", "", 33554432 }); ei.values.push_back({ "KEY_MASK_ALT", "", 67108864 }); @@ -694,12 +694,15 @@ namespace godot ei.values.push_back({ "PROPERTY_HINT_INT_IS_OBJECTID", "", 29 }); ei.values.push_back({ "PROPERTY_HINT_INT_IS_POINTER", "", 30 }); ei.values.push_back({ "PROPERTY_HINT_ARRAY_TYPE", "", 31 }); + ei.values.push_back({ "PROPERTY_HINT_DICTIONARY_TYPE", "", 38 }); ei.values.push_back({ "PROPERTY_HINT_LOCALE_ID", "", 32 }); ei.values.push_back({ "PROPERTY_HINT_LOCALIZABLE_STRING", "", 33 }); ei.values.push_back({ "PROPERTY_HINT_NODE_TYPE", "", 34 }); ei.values.push_back({ "PROPERTY_HINT_HIDE_QUATERNION_EDIT", "", 35 }); ei.values.push_back({ "PROPERTY_HINT_PASSWORD", "", 36 }); - ei.values.push_back({ "PROPERTY_HINT_MAX", "", 38 }); + ei.values.push_back({ "PROPERTY_HINT_TOOL_BUTTON", "", 39 }); + ei.values.push_back({ "PROPERTY_HINT_ONESHOT", "", 40 }); + ei.values.push_back({ "PROPERTY_HINT_MAX", "", 42 }); _sanitize_enum(ei); ExtensionDB::_singleton->_global_enums["PropertyHint"] = ei; ExtensionDB::_singleton->_global_enum_names.push_back("PropertyHint"); @@ -1302,6 +1305,8 @@ namespace godot type.methods.push_back(_make_method("json_escape", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::STRING, { })); type.methods.push_back(_make_method("validate_node_name", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::STRING, { })); type.methods.push_back(_make_method("validate_filename", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::STRING, { })); + type.methods.push_back(_make_method("is_valid_ascii_identifier", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); + type.methods.push_back(_make_method("is_valid_unicode_identifier", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("is_valid_identifier", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("is_valid_int", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("is_valid_float", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); @@ -1371,8 +1376,6 @@ namespace godot type.constructors.push_back({ { PropertyInfo(Variant::FLOAT, "x"), PropertyInfo(Variant::FLOAT, "y") } }); type.properties.push_back({ Variant::FLOAT, "x" }); type.properties.push_back({ Variant::FLOAT, "y" }); - type.constants.push_back({ "AXIS_X", Variant::INT, 0 }); - type.constants.push_back({ "AXIS_Y", Variant::INT, 1 }); type.constants.push_back({ "ZERO", Variant::VECTOR2, Vector2(0, 0) }); type.constants.push_back({ "ONE", Variant::VECTOR2, Vector2(1, 1) }); type.constants.push_back({ "INF", Variant::VECTOR2, Vector2(INFINITY, INFINITY) }); @@ -1470,8 +1473,6 @@ namespace godot type.constructors.push_back({ { PropertyInfo(Variant::INT, "x"), PropertyInfo(Variant::INT, "y") } }); type.properties.push_back({ Variant::INT, "x" }); type.properties.push_back({ Variant::INT, "y" }); - type.constants.push_back({ "AXIS_X", Variant::INT, 0 }); - type.constants.push_back({ "AXIS_Y", Variant::INT, 1 }); type.constants.push_back({ "ZERO", Variant::VECTOR2I, Vector2i(0, 0) }); type.constants.push_back({ "ONE", Variant::VECTOR2I, Vector2i(1, 1) }); type.constants.push_back({ "MIN", Variant::VECTOR2I, Vector2i(-2147483648, -2147483648) }); @@ -1537,6 +1538,7 @@ namespace godot type.methods.push_back(_make_method("intersection", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::RECT2, { { Variant::RECT2, "b" } })); type.methods.push_back(_make_method("merge", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::RECT2, { { Variant::RECT2, "b" } })); type.methods.push_back(_make_method("expand", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::RECT2, { { Variant::VECTOR2, "to" } })); + type.methods.push_back(_make_method("get_support", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::VECTOR2, { { Variant::VECTOR2, "direction" } })); type.methods.push_back(_make_method("grow", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::RECT2, { { Variant::FLOAT, "amount" } })); type.methods.push_back(_make_method("grow_side", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::RECT2, { { Variant::INT, "side" }, { Variant::FLOAT, "amount" } })); type.methods.push_back(_make_method("grow_individual", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::RECT2, { { Variant::FLOAT, "left" }, { Variant::FLOAT, "top" }, { Variant::FLOAT, "right" }, { Variant::FLOAT, "bottom" } })); @@ -1623,9 +1625,6 @@ namespace godot type.properties.push_back({ Variant::FLOAT, "x" }); type.properties.push_back({ Variant::FLOAT, "y" }); type.properties.push_back({ Variant::FLOAT, "z" }); - type.constants.push_back({ "AXIS_X", Variant::INT, 0 }); - type.constants.push_back({ "AXIS_Y", Variant::INT, 1 }); - type.constants.push_back({ "AXIS_Z", Variant::INT, 2 }); type.constants.push_back({ "ZERO", Variant::VECTOR3, Vector3(0, 0, 0) }); type.constants.push_back({ "ONE", Variant::VECTOR3, Vector3(1, 1, 1) }); type.constants.push_back({ "INF", Variant::VECTOR3, Vector3(INFINITY, INFINITY, INFINITY) }); @@ -1732,9 +1731,6 @@ namespace godot type.properties.push_back({ Variant::INT, "x" }); type.properties.push_back({ Variant::INT, "y" }); type.properties.push_back({ Variant::INT, "z" }); - type.constants.push_back({ "AXIS_X", Variant::INT, 0 }); - type.constants.push_back({ "AXIS_Y", Variant::INT, 1 }); - type.constants.push_back({ "AXIS_Z", Variant::INT, 2 }); type.constants.push_back({ "ZERO", Variant::VECTOR3I, Vector3i(0, 0, 0) }); type.constants.push_back({ "ONE", Variant::VECTOR3I, Vector3i(1, 1, 1) }); type.constants.push_back({ "MIN", Variant::VECTOR3I, Vector3i(-2147483648, -2147483648, -2147483648) }); @@ -1863,10 +1859,6 @@ namespace godot type.properties.push_back({ Variant::FLOAT, "y" }); type.properties.push_back({ Variant::FLOAT, "z" }); type.properties.push_back({ Variant::FLOAT, "w" }); - type.constants.push_back({ "AXIS_X", Variant::INT, 0 }); - type.constants.push_back({ "AXIS_Y", Variant::INT, 1 }); - type.constants.push_back({ "AXIS_Z", Variant::INT, 2 }); - type.constants.push_back({ "AXIS_W", Variant::INT, 3 }); type.constants.push_back({ "ZERO", Variant::VECTOR4, Vector4(0, 0, 0, 0) }); type.constants.push_back({ "ONE", Variant::VECTOR4, Vector4(1, 1, 1, 1) }); type.constants.push_back({ "INF", Variant::VECTOR4, Vector4(INFINITY, INFINITY, INFINITY, INFINITY) }); @@ -1946,10 +1938,6 @@ namespace godot type.properties.push_back({ Variant::INT, "y" }); type.properties.push_back({ Variant::INT, "z" }); type.properties.push_back({ Variant::INT, "w" }); - type.constants.push_back({ "AXIS_X", Variant::INT, 0 }); - type.constants.push_back({ "AXIS_Y", Variant::INT, 1 }); - type.constants.push_back({ "AXIS_Z", Variant::INT, 2 }); - type.constants.push_back({ "AXIS_W", Variant::INT, 3 }); type.constants.push_back({ "ZERO", Variant::VECTOR4I, Vector4i(0, 0, 0, 0) }); type.constants.push_back({ "ONE", Variant::VECTOR4I, Vector4i(1, 1, 1, 1) }); type.constants.push_back({ "MIN", Variant::VECTOR4I, Vector4i(-2147483648, -2147483648, -2147483648, -2147483648) }); @@ -2117,7 +2105,7 @@ namespace godot type.methods.push_back(_make_method("merge", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::AABB, { { Variant::AABB, "with" } })); type.methods.push_back(_make_method("expand", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::AABB, { { Variant::VECTOR3, "to_point" } })); type.methods.push_back(_make_method("grow", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::AABB, { { Variant::FLOAT, "by" } })); - type.methods.push_back(_make_method("get_support", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::VECTOR3, { { Variant::VECTOR3, "dir" } })); + type.methods.push_back(_make_method("get_support", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::VECTOR3, { { Variant::VECTOR3, "direction" } })); type.methods.push_back(_make_method("get_longest_axis", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::VECTOR3, { })); type.methods.push_back(_make_method("get_longest_axis_index", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); type.methods.push_back(_make_method("get_longest_axis_size", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::FLOAT, { })); @@ -2261,12 +2249,6 @@ namespace godot type.properties.push_back({ Variant::VECTOR4, "y" }); type.properties.push_back({ Variant::VECTOR4, "z" }); type.properties.push_back({ Variant::VECTOR4, "w" }); - type.constants.push_back({ "PLANE_NEAR", Variant::INT, 0 }); - type.constants.push_back({ "PLANE_FAR", Variant::INT, 1 }); - type.constants.push_back({ "PLANE_LEFT", Variant::INT, 2 }); - type.constants.push_back({ "PLANE_TOP", Variant::INT, 3 }); - type.constants.push_back({ "PLANE_RIGHT", Variant::INT, 4 }); - type.constants.push_back({ "PLANE_BOTTOM", Variant::INT, 5 }); type.constants.push_back({ "IDENTITY", Variant::PROJECTION, Projection(Vector4(1, 0, 0, 0), Vector4(0, 1, 0, 0), Vector4(0, 0, 1, 0), Vector4(0, 0, 0, 1)) }); type.constants.push_back({ "ZERO", Variant::PROJECTION, Projection(Vector4(0, 0, 0, 0), Vector4(0, 0, 0, 0), Vector4(0, 0, 0, 0), Vector4(0, 0, 0, 0)) }); type.enums.push_back({ "Planes", false, { { "PLANE_NEAR", "", 0 }, { "PLANE_FAR", "", 1 }, { "PLANE_LEFT", "", 2 }, { "PLANE_TOP", "", 3 }, { "PLANE_RIGHT", "", 4 }, { "PLANE_BOTTOM", "", 5 } } }); @@ -2344,6 +2326,9 @@ namespace godot type.properties.push_back({ Variant::FLOAT, "h" }); type.properties.push_back({ Variant::FLOAT, "s" }); type.properties.push_back({ Variant::FLOAT, "v" }); + type.properties.push_back({ Variant::FLOAT, "ok_hsl_h" }); + type.properties.push_back({ Variant::FLOAT, "ok_hsl_s" }); + type.properties.push_back({ Variant::FLOAT, "ok_hsl_l" }); type.constants.push_back({ "ALICE_BLUE", Variant::COLOR, Color(0.941176, 0.972549, 1, 1) }); type.constants.push_back({ "ANTIQUE_WHITE", Variant::COLOR, Color(0.980392, 0.921569, 0.843137, 1) }); type.constants.push_back({ "AQUA", Variant::COLOR, Color(0, 1, 1, 1) }); @@ -2515,6 +2500,7 @@ namespace godot type.methods.push_back(_make_method("from_hsv", METHOD_FLAG_NORMAL | METHOD_FLAG_STATIC, Variant::COLOR, { { Variant::FLOAT, "h" }, { Variant::FLOAT, "s" }, { Variant::FLOAT, "v" }, { Variant::FLOAT, "alpha" } })); type.methods.push_back(_make_method("from_ok_hsl", METHOD_FLAG_NORMAL | METHOD_FLAG_STATIC, Variant::COLOR, { { Variant::FLOAT, "h" }, { Variant::FLOAT, "s" }, { Variant::FLOAT, "l" }, { Variant::FLOAT, "alpha" } })); type.methods.push_back(_make_method("from_rgbe9995", METHOD_FLAG_NORMAL | METHOD_FLAG_STATIC, Variant::COLOR, { { Variant::INT, "rgbe" } })); + type.methods.push_back(_make_method("from_rgba8", METHOD_FLAG_NORMAL | METHOD_FLAG_STATIC, Variant::COLOR, { { Variant::INT, "r8" }, { Variant::INT, "g8" }, { Variant::INT, "b8" }, { Variant::INT, "a8" } })); ExtensionDB::_singleton->_builtin_types["Color"] = type; ExtensionDB::_singleton->_builtin_types_to_name[Variant::COLOR] = "Color"; ExtensionDB::_singleton->_builtin_type_names.push_back("Color"); @@ -2663,6 +2649,8 @@ namespace godot type.methods.push_back(_make_method("json_escape", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::STRING, { })); type.methods.push_back(_make_method("validate_node_name", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::STRING, { })); type.methods.push_back(_make_method("validate_filename", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::STRING, { })); + type.methods.push_back(_make_method("is_valid_ascii_identifier", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); + type.methods.push_back(_make_method("is_valid_unicode_identifier", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("is_valid_identifier", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("is_valid_int", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("is_valid_float", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); @@ -2739,6 +2727,8 @@ namespace godot type.operators.push_back({ VariantOperators::OP_LESS_EQUAL, "<=", "Less-than or Equal", Variant::RID, "RID", Variant::RID, "RID", Variant::BOOL }); type.operators.push_back({ VariantOperators::OP_GREATER, ">", "Greater-than", Variant::RID, "RID", Variant::RID, "RID", Variant::BOOL }); type.operators.push_back({ VariantOperators::OP_GREATER_EQUAL, ">=", "Greater-than or Equal", Variant::RID, "RID", Variant::RID, "RID", Variant::BOOL }); + type.operators.push_back({ VariantOperators::OP_IN, "in", "In", Variant::RID, "RID", Variant::DICTIONARY, "Dictionary", Variant::BOOL }); + type.operators.push_back({ VariantOperators::OP_IN, "in", "In", Variant::RID, "RID", Variant::ARRAY, "Array", Variant::BOOL }); type.constructors.push_back({ { } }); type.constructors.push_back({ { PropertyInfo(Variant::RID, "from") } }); type.methods.push_back(_make_method("is_valid", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); @@ -2776,6 +2766,7 @@ namespace godot type.methods.push_back(_make_method("get_argument_count", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); type.methods.push_back(_make_method("get_bound_arguments_count", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); type.methods.push_back(_make_method("get_bound_arguments", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::ARRAY, { })); + type.methods.push_back(_make_method("get_unbound_arguments_count", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); type.methods.push_back(_make_method("hash", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); type.methods.push_back(_make_method("bindv", METHOD_FLAG_NORMAL, Variant::CALLABLE, { { Variant::ARRAY, "arguments" } })); type.methods.push_back(_make_method("unbind", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::CALLABLE, { { Variant::INT, "argcount" } })); @@ -2813,6 +2804,7 @@ namespace godot type.methods.push_back(_make_method("disconnect", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::CALLABLE, "callable" } })); type.methods.push_back(_make_method("is_connected", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { { Variant::CALLABLE, "callable" } })); type.methods.push_back(_make_method("get_connections", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::ARRAY, { })); + type.methods.push_back(_make_method("has_connections", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("emit", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST | METHOD_FLAG_VARARG, Variant::NIL, { })); ExtensionDB::_singleton->_builtin_types["Signal"] = type; ExtensionDB::_singleton->_builtin_types_to_name[Variant::SIGNAL] = "Signal"; @@ -2834,9 +2826,12 @@ namespace godot type.operators.push_back({ VariantOperators::OP_IN, "in", "In", Variant::DICTIONARY, "Dictionary", Variant::ARRAY, "Array", Variant::BOOL }); type.constructors.push_back({ { } }); type.constructors.push_back({ { PropertyInfo(Variant::DICTIONARY, "from") } }); + type.constructors.push_back({ { PropertyInfo(Variant::DICTIONARY, "base"), PropertyInfo(Variant::INT, "key_type"), PropertyInfo(Variant::STRING_NAME, "key_class_name"), PropertyInfo(Variant::NIL, "key_script"), PropertyInfo(Variant::INT, "value_type"), PropertyInfo(Variant::STRING_NAME, "value_class_name"), PropertyInfo(Variant::NIL, "value_script") } }); type.methods.push_back(_make_method("size", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); type.methods.push_back(_make_method("is_empty", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("clear", METHOD_FLAG_NORMAL, Variant::NIL, { })); + type.methods.push_back(_make_method("assign", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::DICTIONARY, "dictionary" } })); + type.methods.push_back(_make_method("sort", METHOD_FLAG_NORMAL, Variant::NIL, { })); type.methods.push_back(_make_method("merge", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::DICTIONARY, "dictionary" }, { Variant::BOOL, "overwrite" } })); type.methods.push_back(_make_method("merged", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::DICTIONARY, { { Variant::DICTIONARY, "dictionary" }, { Variant::BOOL, "overwrite" } })); type.methods.push_back(_make_method("has", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { { Variant::NIL, "key", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT } })); @@ -2849,6 +2844,19 @@ namespace godot type.methods.push_back(_make_method("duplicate", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::DICTIONARY, { { Variant::BOOL, "deep" } })); type.methods.push_back(_make_method("get", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::NIL, { { Variant::NIL, "key", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT }, { Variant::NIL, "default", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT } }, true)); type.methods.push_back(_make_method("get_or_add", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::NIL, "key", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT }, { Variant::NIL, "default", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT } }, true)); + type.methods.push_back(_make_method("set", METHOD_FLAG_NORMAL, Variant::BOOL, { { Variant::NIL, "key", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT }, { Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT } })); + type.methods.push_back(_make_method("is_typed", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); + type.methods.push_back(_make_method("is_typed_key", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); + type.methods.push_back(_make_method("is_typed_value", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); + type.methods.push_back(_make_method("is_same_typed", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { { Variant::DICTIONARY, "dictionary" } })); + type.methods.push_back(_make_method("is_same_typed_key", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { { Variant::DICTIONARY, "dictionary" } })); + type.methods.push_back(_make_method("is_same_typed_value", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { { Variant::DICTIONARY, "dictionary" } })); + type.methods.push_back(_make_method("get_typed_key_builtin", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); + type.methods.push_back(_make_method("get_typed_value_builtin", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); + type.methods.push_back(_make_method("get_typed_key_class_name", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::STRING_NAME, { })); + type.methods.push_back(_make_method("get_typed_value_class_name", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::STRING_NAME, { })); + type.methods.push_back(_make_method("get_typed_key_script", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::NIL, { }, true)); + type.methods.push_back(_make_method("get_typed_value_script", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::NIL, { }, true)); type.methods.push_back(_make_method("make_read_only", METHOD_FLAG_NORMAL, Variant::NIL, { })); type.methods.push_back(_make_method("is_read_only", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("recursive_equal", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { { Variant::DICTIONARY, "dictionary" }, { Variant::INT, "recursion_count" } })); @@ -2893,6 +2901,8 @@ namespace godot type.methods.push_back(_make_method("clear", METHOD_FLAG_NORMAL, Variant::NIL, { })); type.methods.push_back(_make_method("hash", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); type.methods.push_back(_make_method("assign", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::ARRAY, "array" } })); + type.methods.push_back(_make_method("get", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::NIL, { { Variant::INT, "index" } }, true)); + type.methods.push_back(_make_method("set", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::INT, "index" }, { Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT } })); type.methods.push_back(_make_method("push_back", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT } })); type.methods.push_back(_make_method("push_front", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT } })); type.methods.push_back(_make_method("append", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT } })); @@ -2906,7 +2916,9 @@ namespace godot type.methods.push_back(_make_method("back", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::NIL, { }, true)); type.methods.push_back(_make_method("pick_random", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::NIL, { }, true)); type.methods.push_back(_make_method("find", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { { Variant::NIL, "what", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT }, { Variant::INT, "from" } })); + type.methods.push_back(_make_method("find_custom", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { { Variant::CALLABLE, "method" }, { Variant::INT, "from" } })); type.methods.push_back(_make_method("rfind", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { { Variant::NIL, "what", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT }, { Variant::INT, "from" } })); + type.methods.push_back(_make_method("rfind_custom", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { { Variant::CALLABLE, "method" }, { Variant::INT, "from" } })); type.methods.push_back(_make_method("count", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { { Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT } })); type.methods.push_back(_make_method("has", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { { Variant::NIL, "value", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT } })); type.methods.push_back(_make_method("pop_back", METHOD_FLAG_NORMAL, Variant::NIL, { }, true)); @@ -2956,6 +2968,7 @@ namespace godot type.constructors.push_back({ { } }); type.constructors.push_back({ { PropertyInfo(Variant::PACKED_BYTE_ARRAY, "from") } }); type.constructors.push_back({ { PropertyInfo(Variant::ARRAY, "from") } }); + type.methods.push_back(_make_method("get", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { { Variant::INT, "index" } })); type.methods.push_back(_make_method("size", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); type.methods.push_back(_make_method("is_empty", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("set", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::INT, "index" }, { Variant::INT, "value" } })); @@ -3037,6 +3050,7 @@ namespace godot type.constructors.push_back({ { } }); type.constructors.push_back({ { PropertyInfo(Variant::PACKED_INT32_ARRAY, "from") } }); type.constructors.push_back({ { PropertyInfo(Variant::ARRAY, "from") } }); + type.methods.push_back(_make_method("get", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { { Variant::INT, "index" } })); type.methods.push_back(_make_method("size", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); type.methods.push_back(_make_method("is_empty", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("set", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::INT, "index" }, { Variant::INT, "value" } })); @@ -3080,6 +3094,7 @@ namespace godot type.constructors.push_back({ { } }); type.constructors.push_back({ { PropertyInfo(Variant::PACKED_INT64_ARRAY, "from") } }); type.constructors.push_back({ { PropertyInfo(Variant::ARRAY, "from") } }); + type.methods.push_back(_make_method("get", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { { Variant::INT, "index" } })); type.methods.push_back(_make_method("size", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); type.methods.push_back(_make_method("is_empty", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("set", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::INT, "index" }, { Variant::INT, "value" } })); @@ -3123,6 +3138,7 @@ namespace godot type.constructors.push_back({ { } }); type.constructors.push_back({ { PropertyInfo(Variant::PACKED_FLOAT32_ARRAY, "from") } }); type.constructors.push_back({ { PropertyInfo(Variant::ARRAY, "from") } }); + type.methods.push_back(_make_method("get", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::FLOAT, { { Variant::INT, "index" } })); type.methods.push_back(_make_method("size", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); type.methods.push_back(_make_method("is_empty", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("set", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::INT, "index" }, { Variant::FLOAT, "value" } })); @@ -3166,6 +3182,7 @@ namespace godot type.constructors.push_back({ { } }); type.constructors.push_back({ { PropertyInfo(Variant::PACKED_FLOAT64_ARRAY, "from") } }); type.constructors.push_back({ { PropertyInfo(Variant::ARRAY, "from") } }); + type.methods.push_back(_make_method("get", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::FLOAT, { { Variant::INT, "index" } })); type.methods.push_back(_make_method("size", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); type.methods.push_back(_make_method("is_empty", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("set", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::INT, "index" }, { Variant::FLOAT, "value" } })); @@ -3209,6 +3226,7 @@ namespace godot type.constructors.push_back({ { } }); type.constructors.push_back({ { PropertyInfo(Variant::PACKED_STRING_ARRAY, "from") } }); type.constructors.push_back({ { PropertyInfo(Variant::ARRAY, "from") } }); + type.methods.push_back(_make_method("get", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::STRING, { { Variant::INT, "index" } })); type.methods.push_back(_make_method("size", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); type.methods.push_back(_make_method("is_empty", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("set", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::INT, "index" }, { Variant::STRING, "value" } })); @@ -3253,6 +3271,7 @@ namespace godot type.constructors.push_back({ { } }); type.constructors.push_back({ { PropertyInfo(Variant::PACKED_VECTOR2_ARRAY, "from") } }); type.constructors.push_back({ { PropertyInfo(Variant::ARRAY, "from") } }); + type.methods.push_back(_make_method("get", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::VECTOR2, { { Variant::INT, "index" } })); type.methods.push_back(_make_method("size", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); type.methods.push_back(_make_method("is_empty", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("set", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::INT, "index" }, { Variant::VECTOR2, "value" } })); @@ -3297,6 +3316,7 @@ namespace godot type.constructors.push_back({ { } }); type.constructors.push_back({ { PropertyInfo(Variant::PACKED_VECTOR3_ARRAY, "from") } }); type.constructors.push_back({ { PropertyInfo(Variant::ARRAY, "from") } }); + type.methods.push_back(_make_method("get", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::VECTOR3, { { Variant::INT, "index" } })); type.methods.push_back(_make_method("size", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); type.methods.push_back(_make_method("is_empty", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("set", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::INT, "index" }, { Variant::VECTOR3, "value" } })); @@ -3340,6 +3360,7 @@ namespace godot type.constructors.push_back({ { } }); type.constructors.push_back({ { PropertyInfo(Variant::PACKED_COLOR_ARRAY, "from") } }); type.constructors.push_back({ { PropertyInfo(Variant::ARRAY, "from") } }); + type.methods.push_back(_make_method("get", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::COLOR, { { Variant::INT, "index" } })); type.methods.push_back(_make_method("size", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); type.methods.push_back(_make_method("is_empty", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("set", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::INT, "index" }, { Variant::COLOR, "value" } })); @@ -3383,6 +3404,7 @@ namespace godot type.constructors.push_back({ { } }); type.constructors.push_back({ { PropertyInfo(Variant::PACKED_VECTOR4_ARRAY, "from") } }); type.constructors.push_back({ { PropertyInfo(Variant::ARRAY, "from") } }); + type.methods.push_back(_make_method("get", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::VECTOR4, { { Variant::INT, "index" } })); type.methods.push_back(_make_method("size", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::INT, { })); type.methods.push_back(_make_method("is_empty", METHOD_FLAG_NORMAL | METHOD_FLAG_CONST, Variant::BOOL, { })); type.methods.push_back(_make_method("set", METHOD_FLAG_NORMAL, Variant::NIL, { { Variant::INT, "index" }, { Variant::VECTOR4, "value" } })); @@ -4640,11 +4662,26 @@ namespace godot // This currently only loads classes that have bitfield enums; use ClassDB otherwise. // Can eventually be replaced by: https://github.com/godotengine/godot/pull/90368 + // AnimationNodeExtension + ExtensionDB::_singleton->_classes["AnimationNodeExtension"].name = "AnimationNodeExtension"; + ExtensionDB::_singleton->_classes["AnimationNodeExtension"].static_function_hashes["is_looping"] = 2035584311; + ExtensionDB::_singleton->_classes["AnimationNodeExtension"].static_function_hashes["get_remaining_time"] = 2851904656; + + // AudioStreamMP3 + ExtensionDB::_singleton->_classes["AudioStreamMP3"].name = "AudioStreamMP3"; + ExtensionDB::_singleton->_classes["AudioStreamMP3"].static_function_hashes["load_from_buffer"] = 1674970313; + ExtensionDB::_singleton->_classes["AudioStreamMP3"].static_function_hashes["load_from_file"] = 4238362998; + // AudioStreamOggVorbis ExtensionDB::_singleton->_classes["AudioStreamOggVorbis"].name = "AudioStreamOggVorbis"; ExtensionDB::_singleton->_classes["AudioStreamOggVorbis"].static_function_hashes["load_from_buffer"] = 354904730; ExtensionDB::_singleton->_classes["AudioStreamOggVorbis"].static_function_hashes["load_from_file"] = 797568536; + // AudioStreamWAV + ExtensionDB::_singleton->_classes["AudioStreamWAV"].name = "AudioStreamWAV"; + ExtensionDB::_singleton->_classes["AudioStreamWAV"].static_function_hashes["load_from_buffer"] = 4266838938; + ExtensionDB::_singleton->_classes["AudioStreamWAV"].static_function_hashes["load_from_file"] = 4015802384; + // Control ExtensionDB::_singleton->_classes["Control"].name = "Control"; ExtensionDB::_singleton->_classes["Control"].bitfield_enums.push_back("SizeFlags"); @@ -4653,6 +4690,7 @@ namespace godot ExtensionDB::_singleton->_classes["DirAccess"].name = "DirAccess"; ExtensionDB::_singleton->_classes["DirAccess"].static_function_hashes["open"] = 1923528528; ExtensionDB::_singleton->_classes["DirAccess"].static_function_hashes["get_open_error"] = 166280745; + ExtensionDB::_singleton->_classes["DirAccess"].static_function_hashes["create_temp"] = 812913566; ExtensionDB::_singleton->_classes["DirAccess"].static_function_hashes["get_files_at"] = 3538744774; ExtensionDB::_singleton->_classes["DirAccess"].static_function_hashes["get_directories_at"] = 3538744774; ExtensionDB::_singleton->_classes["DirAccess"].static_function_hashes["get_drive_count"] = 2455072627; @@ -4664,13 +4702,23 @@ namespace godot ExtensionDB::_singleton->_classes["DirAccess"].static_function_hashes["rename_absolute"] = 852856452; ExtensionDB::_singleton->_classes["DirAccess"].static_function_hashes["remove_absolute"] = 166001499; + // EditorExportPlatform + ExtensionDB::_singleton->_classes["EditorExportPlatform"].name = "EditorExportPlatform"; + ExtensionDB::_singleton->_classes["EditorExportPlatform"].static_function_hashes["get_forced_export_files"] = 2981934095; + ExtensionDB::_singleton->_classes["EditorExportPlatform"].bitfield_enums.push_back("DebugFlags"); + + // EditorInspector + ExtensionDB::_singleton->_classes["EditorInspector"].name = "EditorInspector"; + ExtensionDB::_singleton->_classes["EditorInspector"].static_function_hashes["instantiate_property_editor"] = 1429914152; + // FileAccess ExtensionDB::_singleton->_classes["FileAccess"].name = "FileAccess"; ExtensionDB::_singleton->_classes["FileAccess"].static_function_hashes["open"] = 1247358404; - ExtensionDB::_singleton->_classes["FileAccess"].static_function_hashes["open_encrypted"] = 1482131466; + ExtensionDB::_singleton->_classes["FileAccess"].static_function_hashes["open_encrypted"] = 788003459; ExtensionDB::_singleton->_classes["FileAccess"].static_function_hashes["open_encrypted_with_pass"] = 790283377; ExtensionDB::_singleton->_classes["FileAccess"].static_function_hashes["open_compressed"] = 3686439335; ExtensionDB::_singleton->_classes["FileAccess"].static_function_hashes["get_open_error"] = 166280745; + ExtensionDB::_singleton->_classes["FileAccess"].static_function_hashes["create_temp"] = 3075606245; ExtensionDB::_singleton->_classes["FileAccess"].static_function_hashes["get_file_as_bytes"] = 659035735; ExtensionDB::_singleton->_classes["FileAccess"].static_function_hashes["get_file_as_string"] = 1703090593; ExtensionDB::_singleton->_classes["FileAccess"].static_function_hashes["get_md5"] = 1703090593; @@ -4696,8 +4744,11 @@ namespace godot // GLTFDocument ExtensionDB::_singleton->_classes["GLTFDocument"].name = "GLTFDocument"; + ExtensionDB::_singleton->_classes["GLTFDocument"].static_function_hashes["import_object_model_property"] = 1206708632; + ExtensionDB::_singleton->_classes["GLTFDocument"].static_function_hashes["export_object_model_property"] = 314209806; ExtensionDB::_singleton->_classes["GLTFDocument"].static_function_hashes["register_gltf_document_extension"] = 3752678331; ExtensionDB::_singleton->_classes["GLTFDocument"].static_function_hashes["unregister_gltf_document_extension"] = 2684415758; + ExtensionDB::_singleton->_classes["GLTFDocument"].static_function_hashes["get_supported_gltf_extensions"] = 2981934095; // GLTFLight ExtensionDB::_singleton->_classes["GLTFLight"].name = "GLTFLight"; @@ -4734,6 +4785,8 @@ namespace godot ExtensionDB::_singleton->_classes["JSON"].name = "JSON"; ExtensionDB::_singleton->_classes["JSON"].static_function_hashes["stringify"] = 462733549; ExtensionDB::_singleton->_classes["JSON"].static_function_hashes["parse_string"] = 309047738; + ExtensionDB::_singleton->_classes["JSON"].static_function_hashes["from_native"] = 2963479484; + ExtensionDB::_singleton->_classes["JSON"].static_function_hashes["to_native"] = 2963479484; // Mesh ExtensionDB::_singleton->_classes["Mesh"].name = "Mesh"; @@ -4789,7 +4842,7 @@ namespace godot // RegEx ExtensionDB::_singleton->_classes["RegEx"].name = "RegEx"; - ExtensionDB::_singleton->_classes["RegEx"].static_function_hashes["create_from_string"] = 2150300909; + ExtensionDB::_singleton->_classes["RegEx"].static_function_hashes["create_from_string"] = 4249111514; // RenderingDevice ExtensionDB::_singleton->_classes["RenderingDevice"].name = "RenderingDevice"; @@ -4797,6 +4850,7 @@ namespace godot ExtensionDB::_singleton->_classes["RenderingDevice"].bitfield_enums.push_back("TextureUsageBits"); ExtensionDB::_singleton->_classes["RenderingDevice"].bitfield_enums.push_back("StorageBufferUsage"); ExtensionDB::_singleton->_classes["RenderingDevice"].bitfield_enums.push_back("PipelineDynamicStateFlags"); + ExtensionDB::_singleton->_classes["RenderingDevice"].bitfield_enums.push_back("DrawFlags"); // RenderingServer ExtensionDB::_singleton->_classes["RenderingServer"].name = "RenderingServer"; @@ -4815,10 +4869,20 @@ namespace godot ExtensionDB::_singleton->_classes["ResourceSaver"].name = "ResourceSaver"; ExtensionDB::_singleton->_classes["ResourceSaver"].bitfield_enums.push_back("SaverFlags"); + // RetargetModifier3D + ExtensionDB::_singleton->_classes["RetargetModifier3D"].name = "RetargetModifier3D"; + ExtensionDB::_singleton->_classes["RetargetModifier3D"].bitfield_enums.push_back("TransformFlag"); + // RichTextLabel ExtensionDB::_singleton->_classes["RichTextLabel"].name = "RichTextLabel"; ExtensionDB::_singleton->_classes["RichTextLabel"].bitfield_enums.push_back("ImageUpdateMask"); + // ShaderIncludeDB + ExtensionDB::_singleton->_classes["ShaderIncludeDB"].name = "ShaderIncludeDB"; + ExtensionDB::_singleton->_classes["ShaderIncludeDB"].static_function_hashes["list_built_in_include_files"] = 2981934095; + ExtensionDB::_singleton->_classes["ShaderIncludeDB"].static_function_hashes["has_built_in_include_file"] = 2323990056; + ExtensionDB::_singleton->_classes["ShaderIncludeDB"].static_function_hashes["get_built_in_include_file"] = 1703090593; + // TLSOptions ExtensionDB::_singleton->_classes["TLSOptions"].name = "TLSOptions"; ExtensionDB::_singleton->_classes["TLSOptions"].static_function_hashes["client"] = 3565000357; diff --git a/src/script/serialization/text_loader_instance.cpp b/src/script/serialization/text_loader_instance.cpp index d753ee59..7d2b6fa9 100644 --- a/src/script/serialization/text_loader_instance.cpp +++ b/src/script/serialization/text_loader_instance.cpp @@ -882,10 +882,8 @@ Error OScriptTextResourceLoaderInstance::load() if (!ResourceCache::has(_res_path)) _resource->set_path(_res_path); - // todo: does this create any issues? - #if GODOT_VERSION >= 0x040400 - _resource->set_as_translation_remapped(_translation_remapped); - #endif + // todo: requires Godot change to support this + // _resource->set_as_translation_remapped(_translation_remapped); } else { From 9cdb1b0b30a71494e0e2d1bd450bf40021b57232 Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Sat, 8 Feb 2025 08:20:42 -0500 Subject: [PATCH 2/7] GH-868 Remove commented lines --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dd1b852e..254baa63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -193,8 +193,6 @@ ELSE() SET(ORCHESTRATOR_ARCH "32") ENDIF() -# STRING(TOLOWER ${PROJECT_NAME}.${GODOT_PLATFORM}.${ORCHESTRATOR_ARCH}.$> GDEXTENSION_LIB_NAME) - SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES PREFIX "${GDEXTENSION_LIB_PREFIX}" From 11babb95320d05337dc1774250cb195dc2df3b71 Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Sat, 8 Feb 2025 08:23:19 -0500 Subject: [PATCH 3/7] GH-868 Include GODOT_ARCH in build config output --- cmake/cmake-utils.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/cmake-utils.cmake b/cmake/cmake-utils.cmake index 97c792a9..965f7b18 100644 --- a/cmake/cmake-utils.cmake +++ b/cmake/cmake-utils.cmake @@ -108,6 +108,7 @@ FUNCTION( PRINT_PROJECT_VARIABLES ) MESSAGE( NOTICE " CMAKE_MINIMUM_REQUIRED_VERSION:..........: " ${CMAKE_MINIMUM_REQUIRED_VERSION} ) MESSAGE( NOTICE " VCPKG_TARGET_TRIPLET.....................: " ${VCPKG_TARGET_TRIPLET} ) MESSAGE( NOTICE " CMAKE_DEBUG_POSTFIX......................: " ${CMAKE_DEBUG_POSTFIX} ) + MESSAGE( NOTICE " GODOT_ARCH...............................: " ${GODOT_ARCH} ) MESSAGE( NOTICE " ORCHESTRATOR_ARCH........................: " ${ORCHESTRATOR_ARCH} ) MESSAGE( NOTICE " GDEXTENSION_LIB_NAME.....................: " ${GDEXTENSION_LIB_NAME} ) MESSAGE( NOTICE " RESOLVED_VERSION.........................: " ${RESOLVED_VERSION} ) From 6ee23d6ece6770f33b5b331be23732698c3830f1 Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Sat, 8 Feb 2025 08:41:15 -0500 Subject: [PATCH 4/7] GH-868 Fix file name resolution based on platform/arch/prefix --- CMakeLists.txt | 10 +++++++--- .../orchestrator/orchestrator.gdextension | 20 +++++++++---------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 254baa63..dd978746 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,11 +187,15 @@ get_target_property( GODOT_TARGET godot-cpp::editor GODOT_TARGET ) get_target_property( GODOT_ARCH godot-cpp::editor GODOT_ARCH ) # Converts GODOT_ARCH to the old system bits for unchanged file names. -IF (GODOT_ARCH STREQUAL "x86_64") +IF (GODOT_ARCH STREQUAL "x86_64" OR GODOT_ARCH STREQUAL "arm64") SET(ORCHESTRATOR_ARCH "64") -ELSE() +ELSE () SET(ORCHESTRATOR_ARCH "32") -ENDIF() +ENDIF () + +IF (GODOT_PLATFORM STREQUAL "android") + SET(GDEXTENSION_LIB_PREFIX "lib") +ENDIF () SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES diff --git a/project/addons/orchestrator/orchestrator.gdextension b/project/addons/orchestrator/orchestrator.gdextension index 8e36f115..9caf4725 100644 --- a/project/addons/orchestrator/orchestrator.gdextension +++ b/project/addons/orchestrator/orchestrator.gdextension @@ -6,17 +6,17 @@ reloadable = false [libraries] -linux.x86_64 = "res://addons/orchestrator/orchestrator.linux.x86_64.release.so" -#linux.debug.x86_64 = "res://addons/orchestrator/orchestrator.linux.x86_64.debug.so" +linux.x86_64 = "res://addons/orchestrator/orchestrator.linux.64.release.so" +#linux.debug.x86_64 = "res://addons/orchestrator/orchestrator.linux.64.debug.so" -macos = "res://addons/orchestrator/orchestrator.darwin.x86_64.release.dylib" -#macos.debug = "res://addons/orchestrator/orchestrator.darwin.x86_64.debug.dylib" +macos = "res://addons/orchestrator/orchestrator.darwin.64.release.dylib" +#macos.debug = "res://addons/orchestrator/orchestrator.darwin.64.debug.dylib" -windows.x86_64 = "res://addons/orchestrator/orchestrator.windows.x86_64.release.dll" -#windows.debug.x86_64 = "res://addons/orchestrator/orchestrator.windows.x86_64.debug.dll" +windows.x86_64 = "res://addons/orchestrator/orchestrator.windows.64.release.dll" +#windows.debug.x86_64 = "res://addons/orchestrator/orchestrator.windows.64.debug.dll" -android.arm32 = "res://addons/orchestrator/liborchestrator.android.x86_32.release.so" -#android.debug.arm32 = "res://addons/orchestrator/liborchestrator.android.x86_32.debug.so" +android.arm32 = "res://addons/orchestrator/liborchestrator.android.32.release.so" +#android.debug.arm32 = "res://addons/orchestrator/liborchestrator.android.32.debug.so" -android.arm64 = "res://addons/orchestrator/liborchestrator.android.x86_64.release.so" -#android.debug.arm64 = "res://addons/orchestrator/liborchestrator.android.x86_64.debug.so" +android.arm64 = "res://addons/orchestrator/liborchestrator.android.64.release.so" +#android.debug.arm64 = "res://addons/orchestrator/liborchestrator.android.64.debug.so" From 503fc666c822065b399397f870c97a7e4702811e Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Sat, 8 Feb 2025 08:45:41 -0500 Subject: [PATCH 5/7] GH-868 Resolve prefix based on ANDROID identifier --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dd978746..125cdd5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -193,7 +193,7 @@ ELSE () SET(ORCHESTRATOR_ARCH "32") ENDIF () -IF (GODOT_PLATFORM STREQUAL "android") +IF (ANDROID) SET(GDEXTENSION_LIB_PREFIX "lib") ENDIF () From a5fcdb568acaf6881e114fee35912c577416c493 Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Sat, 8 Feb 2025 08:52:56 -0500 Subject: [PATCH 6/7] GH-868 Use new `macos` platform name rather than `darwin` --- project/addons/orchestrator/orchestrator.gdextension | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/addons/orchestrator/orchestrator.gdextension b/project/addons/orchestrator/orchestrator.gdextension index 9caf4725..df07db85 100644 --- a/project/addons/orchestrator/orchestrator.gdextension +++ b/project/addons/orchestrator/orchestrator.gdextension @@ -9,8 +9,8 @@ reloadable = false linux.x86_64 = "res://addons/orchestrator/orchestrator.linux.64.release.so" #linux.debug.x86_64 = "res://addons/orchestrator/orchestrator.linux.64.debug.so" -macos = "res://addons/orchestrator/orchestrator.darwin.64.release.dylib" -#macos.debug = "res://addons/orchestrator/orchestrator.darwin.64.debug.dylib" +macos = "res://addons/orchestrator/orchestrator.macos.64.release.dylib" +#macos.debug = "res://addons/orchestrator/orchestrator.macos.64.debug.dylib" windows.x86_64 = "res://addons/orchestrator/orchestrator.windows.64.release.dll" #windows.debug.x86_64 = "res://addons/orchestrator/orchestrator.windows.64.debug.dll" From 7d7269c02af8b91189cfb59908587205af7902c4 Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Sat, 8 Feb 2025 09:39:05 -0500 Subject: [PATCH 7/7] GH-868 Add Orchestrator's doc generator back --- CMakeLists.txt | 9 ++++----- cmake/cmake-utils.cmake | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 125cdd5a..4515686d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,8 @@ ELSE () SET(GODOT_CPP_GIT_COMMIT_HASH "") ENDIF () +find_package(Python3 3.4 REQUIRED) + # Setup the CMAKE_MODULE_PATH LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") @@ -60,6 +62,7 @@ INCLUDE(generate-license) INCLUDE(generate-version) INCLUDE(generate-donors) INCLUDE(godot-extension-db-generator) +INCLUDE(godot-docs-generator) # Generation steps GENERATE_AUTHORS() @@ -67,6 +70,7 @@ GENERATE_LICENSE() GENERATE_VERSION() GENERATE_DONORS() GENERATE_GODOT_EXTENSION_DB() +GENERATE_GODOT_DOCUMENTATION() # Configure project PROJECT("${GDEXTENSION_LIB_NAME}" LANGUAGES C CXX VERSION ${RESOLVED_VERSION}) @@ -93,11 +97,6 @@ SET(compiler_is_msvc "$") # Configure godot-cpp - a statically linked library to this project. INCLUDE(godot-dev-configuration) -# Generate Doc Data -file( GLOB_RECURSE DOC_XML LIST_DIRECTORIES NO CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/doc_classes/*.xml" ) -SET(DOC_DATA_CPP_FILE "${CMAKE_BINARY_DIR}/_generated/doc_data.cpp") -generate_doc_source( "${DOC_DATA_CPP_FILE}" "${DOC_XML}" ) - # Library sources FILE(GLOB_RECURSE gdext_sources CONFIGURE_DEPENDS diff --git a/cmake/cmake-utils.cmake b/cmake/cmake-utils.cmake index 965f7b18..a33ce6e5 100644 --- a/cmake/cmake-utils.cmake +++ b/cmake/cmake-utils.cmake @@ -122,6 +122,7 @@ FUNCTION( PRINT_PROJECT_VARIABLES ) MESSAGE( NOTICE " CMAKE_COMMAND:...........................: " ${CMAKE_COMMAND} ) MESSAGE( NOTICE " CLANG_FORMAT_PROGRAM:....................: " ${CLANG_FORMAT_PROGRAM} ) MESSAGE( NOTICE " SCONS_PROGRAM:...........................: " ${SCONS_PROGRAM} ) + MESSAGE( NOTICE " PYTHON3..................................: " ${Python3_EXECUTABLE} ) MESSAGE( NOTICE " CMAKE_CXX_COMPILER:......................: " ${CMAKE_CXX_COMPILER} ) MESSAGE( NOTICE " CMAKE_CXX_FLAGS..........................: " ${CMAKE_CXX_FLAGS} ) MESSAGE( NOTICE " CMAKE_LINKER:............................: " ${CMAKE_LINKER} )