summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--CMakeLists.txt2
-rw-r--r--SConstruct74
-rw-r--r--binding_generator.py10
-rw-r--r--gdextension/extension_api.json1278
-rw-r--r--gdextension/gdextension_interface.h136
-rw-r--r--src/godot.cpp11
-rw-r--r--test/project/main.gd7
-rw-r--r--test/src/example.cpp26
-rw-r--r--test/src/example.h6
-rw-r--r--tools/windows.py2
11 files changed, 1177 insertions, 377 deletions
diff --git a/.gitignore b/.gitignore
index a51e14d..7c87766 100644
--- a/.gitignore
+++ b/.gitignore
@@ -100,7 +100,7 @@ AppPackages/
# Others
sql/
-*.Cache
+*.[Cc]ache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f955f79..0ee99aa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,7 +86,7 @@ set(GODOT_COMPILE_FLAGS )
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# using Visual Studio C++
- set(GODOT_COMPILE_FLAGS "/EHsc") # /GF /MP
+ set(GODOT_COMPILE_FLAGS "/EHsc /utf-8") # /GF /MP
if(CMAKE_BUILD_TYPE MATCHES Debug)
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} /MDd") # /Od /RTC1 /Zi
diff --git a/SConstruct b/SConstruct
index 42f8fc0..11ec4cf 100644
--- a/SConstruct
+++ b/SConstruct
@@ -51,9 +51,13 @@ elif ARGUMENTS.get("platform", ""):
else:
raise ValueError("Could not detect platform automatically, please specify with platform=<platform>")
-# Default tools with no platform defaults to gnu toolchain.
-# We apply platform specific toolchains via our custom tools.
-env = Environment(tools=["default"], PLATFORM="")
+try:
+ Import("env")
+except:
+ # Default tools with no platform defaults to gnu toolchain.
+ # We apply platform specific toolchains via our custom tools.
+ env = Environment(tools=["default"], PLATFORM="")
+
env.PrependENVPath("PATH", os.getenv("PATH"))
# Default num_jobs to local cpu count if not user specified.
@@ -87,9 +91,9 @@ opts = Variables(customs, ARGUMENTS)
platforms = ("linux", "macos", "windows", "android", "ios", "javascript")
opts.Add(
EnumVariable(
- "platform",
- "Target platform",
- default_platform,
+ key="platform",
+ help="Target platform",
+ default=env.get("platform", default_platform),
allowed_values=platforms,
ignorecase=2,
)
@@ -99,31 +103,53 @@ opts.Add(
# Godot release templates are only compatible with "template_release" builds.
# For this reason, we default to template_debug builds, unlike Godot which defaults to editor builds.
opts.Add(
- EnumVariable("target", "Compilation target", "template_debug", ("editor", "template_release", "template_debug"))
+ EnumVariable(
+ key="target",
+ help="Compilation target",
+ default=env.get("target", "template_debug"),
+ allowed_values=("editor", "template_release", "template_debug"),
+ )
)
opts.Add(
PathVariable(
- "gdextension_dir",
- "Path to a custom directory containing GDExtension interface header and API JSON file",
- None,
- validate_gdextension_dir,
+ key="gdextension_dir",
+ help="Path to a custom directory containing GDExtension interface header and API JSON file",
+ default=env.get("gdextension_dir", None),
+ validator=validate_gdextension_dir,
)
)
opts.Add(
PathVariable(
- "custom_api_file",
- "Path to a custom GDExtension API JSON file (takes precedence over `gdextension_dir`)",
- None,
- validate_api_file,
+ key="custom_api_file",
+ help="Path to a custom GDExtension API JSON file (takes precedence over `gdextension_dir`)",
+ default=env.get("custom_api_file", None),
+ validator=validate_api_file,
+ )
+)
+opts.Add(
+ BoolVariable(
+ key="generate_bindings",
+ help="Force GDExtension API bindings generation. Auto-detected by default.",
+ default=env.get("generate_bindings", False),
)
)
opts.Add(
- BoolVariable("generate_bindings", "Force GDExtension API bindings generation. Auto-detected by default.", False)
+ BoolVariable(
+ key="generate_template_get_node",
+ help="Generate a template version of the Node class's get_node.",
+ default=env.get("generate_template_get_node", True),
+ )
)
-opts.Add(BoolVariable("generate_template_get_node", "Generate a template version of the Node class's get_node.", True))
-opts.Add(BoolVariable("build_library", "Build the godot-cpp library.", True))
-opts.Add(EnumVariable("precision", "Set the floating-point precision level", "single", ("single", "double")))
+opts.Add(BoolVariable(key="build_library", help="Build the godot-cpp library.", default=env.get("build_library", True)))
+opts.Add(
+ EnumVariable(
+ key="precision",
+ help="Set the floating-point precision level",
+ default=env.get("precision", "single"),
+ allowed_values=("single", "double"),
+ )
+)
# Add platform options
tools = {}
@@ -149,7 +175,15 @@ architecture_aliases = {
"ppc": "ppc32",
"ppc64le": "ppc64",
}
-opts.Add(EnumVariable("arch", "CPU architecture", "", architecture_array, architecture_aliases))
+opts.Add(
+ EnumVariable(
+ key="arch",
+ help="CPU architecture",
+ default=env.get("arch", ""),
+ allowed_values=architecture_array,
+ map=architecture_aliases,
+ )
+)
# Targets flags tool (optimizations, debug symbols)
target_tool = Tool("targets", toolpath=["tools"])
diff --git a/binding_generator.py b/binding_generator.py
index d04c698..acc625d 100644
--- a/binding_generator.py
+++ b/binding_generator.py
@@ -1453,9 +1453,8 @@ def generate_engine_class_source(class_api, used_classes, fully_used_classes, us
if is_singleton:
result.append(f"{class_name} *{class_name}::get_singleton() {{")
- result.append(f"\tconst StringName _gde_class_name = {class_name}::get_class_static();")
result.append(
- "\tstatic GDExtensionObjectPtr singleton_obj = internal::gdextension_interface_global_get_singleton(_gde_class_name._native_ptr());"
+ f"\tstatic GDExtensionObjectPtr singleton_obj = internal::gdextension_interface_global_get_singleton({class_name}::get_class_static()._native_ptr());"
)
result.append("#ifdef DEBUG_ENABLED")
result.append("\tERR_FAIL_COND_V(singleton_obj == nullptr, nullptr);")
@@ -1480,10 +1479,8 @@ def generate_engine_class_source(class_api, used_classes, fully_used_classes, us
result.append(method_signature + " {")
# Method body.
- result.append(f"\tconst StringName _gde_class_name = {class_name}::get_class_static();")
- result.append(f'\tconst StringName _gde_method_name = "{method["name"]}";')
result.append(
- f'\tstatic GDExtensionMethodBindPtr _gde_method_bind = internal::gdextension_interface_classdb_get_method_bind(_gde_class_name._native_ptr(), _gde_method_name._native_ptr(), {method["hash"]});'
+ f'\tstatic GDExtensionMethodBindPtr _gde_method_bind = internal::gdextension_interface_classdb_get_method_bind({class_name}::get_class_static()._native_ptr(), StringName("{method["name"]}")._native_ptr(), {method["hash"]});'
)
method_call = "\t"
has_return = "return_value" in method and method["return_value"]["type"] != "void"
@@ -1773,9 +1770,8 @@ def generate_utility_functions(api, output_dir):
# Function body.
- source.append(f'\tconst StringName _gde_function_name = "{function["name"]}";')
source.append(
- f'\tstatic GDExtensionPtrUtilityFunction _gde_function = internal::gdextension_interface_variant_get_ptr_utility_function(_gde_function_name._native_ptr(), {function["hash"]});'
+ f'\tstatic GDExtensionPtrUtilityFunction _gde_function = internal::gdextension_interface_variant_get_ptr_utility_function(StringName("{function["name"]}")._native_ptr(), {function["hash"]});'
)
has_return = "return_type" in function and function["return_type"] != "void"
if has_return:
diff --git a/gdextension/extension_api.json b/gdextension/extension_api.json
index a81d648..40481ed 100644
--- a/gdextension/extension_api.json
+++ b/gdextension/extension_api.json
@@ -2,10 +2,10 @@
"header": {
"version_major": 4,
"version_minor": 1,
- "version_patch": 0,
- "version_status": "beta2",
+ "version_patch": 1,
+ "version_status": "stable",
"version_build": "official",
- "version_full_name": "Godot Engine v4.1.beta2.official"
+ "version_full_name": "Godot Engine v4.1.1.stable.official"
},
"builtin_class_sizes": [
{
@@ -7076,6 +7076,10 @@
"return_type": "String"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "%",
"right_type": "bool",
"return_type": "String"
@@ -8761,6 +8765,10 @@
"return_type": "Vector2"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "*",
"right_type": "int",
"return_type": "Vector2"
@@ -9551,6 +9559,10 @@
"return_type": "Vector2i"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "*",
"right_type": "int",
"return_type": "Vector2i"
@@ -9798,6 +9810,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "==",
"right_type": "Rect2",
"return_type": "bool"
@@ -10114,6 +10130,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "==",
"right_type": "Rect2i",
"return_type": "bool"
@@ -10518,6 +10538,10 @@
"return_type": "Vector3"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "*",
"right_type": "int",
"return_type": "Vector3"
@@ -11359,6 +11383,10 @@
"return_type": "Vector3i"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "*",
"right_type": "int",
"return_type": "Vector3i"
@@ -11620,6 +11648,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "*",
"right_type": "int",
"return_type": "Transform2D"
@@ -12072,6 +12104,10 @@
"return_type": "Vector4"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "*",
"right_type": "int",
"return_type": "Vector4"
@@ -12626,6 +12662,10 @@
"return_type": "Vector4i"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "*",
"right_type": "int",
"return_type": "Vector4i"
@@ -12906,6 +12946,10 @@
"return_type": "Plane"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "==",
"right_type": "Plane",
"return_type": "bool"
@@ -13224,6 +13268,10 @@
"return_type": "Quaternion"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "*",
"right_type": "int",
"return_type": "Quaternion"
@@ -13638,6 +13686,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "==",
"right_type": "AABB",
"return_type": "bool"
@@ -14032,6 +14084,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "*",
"right_type": "int",
"return_type": "Basis"
@@ -14410,6 +14466,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "*",
"right_type": "int",
"return_type": "Transform3D"
@@ -14813,6 +14873,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "*",
"right_type": "Vector4",
"return_type": "Vector4"
@@ -16146,6 +16210,10 @@
"return_type": "Color"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "*",
"right_type": "int",
"return_type": "Color"
@@ -16653,6 +16721,10 @@
"return_type": "String"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "%",
"right_type": "bool",
"return_type": "String"
@@ -18139,6 +18211,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "==",
"right_type": "NodePath",
"return_type": "bool"
@@ -18293,6 +18369,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "==",
"right_type": "RID",
"return_type": "bool"
@@ -18372,6 +18452,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "==",
"right_type": "Callable",
"return_type": "bool"
@@ -18603,6 +18687,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "==",
"right_type": "Signal",
"return_type": "bool"
@@ -18763,6 +18851,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "==",
"right_type": "Dictionary",
"return_type": "bool"
@@ -18987,6 +19079,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "in",
"right_type": "Dictionary",
"return_type": "bool"
@@ -19727,6 +19823,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "in",
"right_type": "Dictionary",
"return_type": "bool"
@@ -20614,6 +20714,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "in",
"right_type": "Dictionary",
"return_type": "bool"
@@ -20955,6 +21059,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "in",
"right_type": "Dictionary",
"return_type": "bool"
@@ -21296,6 +21404,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "in",
"right_type": "Dictionary",
"return_type": "bool"
@@ -21637,6 +21749,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "in",
"right_type": "Dictionary",
"return_type": "bool"
@@ -21978,6 +22094,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "in",
"right_type": "Dictionary",
"return_type": "bool"
@@ -22319,6 +22439,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "*",
"right_type": "Transform2D",
"return_type": "PackedVector2Array"
@@ -22665,6 +22789,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "*",
"right_type": "Transform3D",
"return_type": "PackedVector3Array"
@@ -23011,6 +23139,10 @@
"return_type": "bool"
},
{
+ "name": "not",
+ "return_type": "bool"
+ },
+ {
"name": "in",
"right_type": "Dictionary",
"return_type": "bool"
@@ -53463,6 +53595,17 @@
}
},
{
+ "name": "get_camera_projection",
+ "is_const": true,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 2910717950,
+ "return_value": {
+ "type": "Projection"
+ }
+ },
+ {
"name": "get_fov",
"is_const": true,
"is_vararg": false,
@@ -73476,12 +73619,12 @@
{
"name": "callback",
"type": "Callable",
- "default_value": ""
+ "default_value": "Callable()"
},
{
"name": "key_callback",
"type": "Callable",
- "default_value": ""
+ "default_value": "Callable()"
},
{
"name": "tag",
@@ -73524,12 +73667,12 @@
{
"name": "callback",
"type": "Callable",
- "default_value": ""
+ "default_value": "Callable()"
},
{
"name": "key_callback",
"type": "Callable",
- "default_value": ""
+ "default_value": "Callable()"
},
{
"name": "tag",
@@ -73576,12 +73719,12 @@
{
"name": "callback",
"type": "Callable",
- "default_value": ""
+ "default_value": "Callable()"
},
{
"name": "key_callback",
"type": "Callable",
- "default_value": ""
+ "default_value": "Callable()"
},
{
"name": "tag",
@@ -73628,12 +73771,12 @@
{
"name": "callback",
"type": "Callable",
- "default_value": ""
+ "default_value": "Callable()"
},
{
"name": "key_callback",
"type": "Callable",
- "default_value": ""
+ "default_value": "Callable()"
},
{
"name": "tag",
@@ -73676,12 +73819,12 @@
{
"name": "callback",
"type": "Callable",
- "default_value": ""
+ "default_value": "Callable()"
},
{
"name": "key_callback",
"type": "Callable",
- "default_value": ""
+ "default_value": "Callable()"
},
{
"name": "tag",
@@ -73728,12 +73871,12 @@
{
"name": "callback",
"type": "Callable",
- "default_value": ""
+ "default_value": "Callable()"
},
{
"name": "key_callback",
"type": "Callable",
- "default_value": ""
+ "default_value": "Callable()"
},
{
"name": "tag",
@@ -73786,12 +73929,12 @@
{
"name": "callback",
"type": "Callable",
- "default_value": ""
+ "default_value": "Callable()"
},
{
"name": "key_callback",
"type": "Callable",
- "default_value": ""
+ "default_value": "Callable()"
},
{
"name": "tag",
@@ -75876,6 +76019,25 @@
]
},
{
+ "name": "window_is_focused",
+ "is_const": true,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 1051549951,
+ "return_value": {
+ "type": "bool"
+ },
+ "arguments": [
+ {
+ "name": "window_id",
+ "type": "int",
+ "meta": "int32",
+ "default_value": "0"
+ }
+ ]
+ },
+ {
"name": "window_can_draw",
"is_const": true,
"is_vararg": false,
@@ -76878,6 +77040,29 @@
"return_value": {
"type": "typedarray::ENetPacketPeer"
}
+ },
+ {
+ "name": "socket_send",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 1100646812,
+ "arguments": [
+ {
+ "name": "destination_address",
+ "type": "String"
+ },
+ {
+ "name": "destination_port",
+ "type": "int",
+ "meta": "int32"
+ },
+ {
+ "name": "packet",
+ "type": "PackedByteArray"
+ }
+ ]
}
]
},
@@ -96260,303 +96445,6 @@
]
},
{
- "name": "GLTFCollider",
- "is_refcounted": true,
- "is_instantiable": true,
- "inherits": "Resource",
- "api_type": "core",
- "methods": [
- {
- "name": "from_node",
- "is_const": false,
- "is_vararg": false,
- "is_static": true,
- "is_virtual": false,
- "hash": 430151272,
- "return_value": {
- "type": "GLTFCollider"
- },
- "arguments": [
- {
- "name": "collider_node",
- "type": "CollisionShape3D"
- }
- ]
- },
- {
- "name": "to_node",
- "is_const": false,
- "is_vararg": false,
- "is_static": false,
- "is_virtual": false,
- "hash": 563689933,
- "return_value": {
- "type": "CollisionShape3D"
- },
- "arguments": [
- {
- "name": "cache_shapes",
- "type": "bool",
- "default_value": "false"
- }
- ]
- },
- {
- "name": "from_dictionary",
- "is_const": false,
- "is_vararg": false,
- "is_static": true,
- "is_virtual": false,
- "hash": 1625251399,
- "return_value": {
- "type": "GLTFCollider"
- },
- "arguments": [
- {
- "name": "dictionary",
- "type": "Dictionary"
- }
- ]
- },
- {
- "name": "to_dictionary",
- "is_const": true,
- "is_vararg": false,
- "is_static": false,
- "is_virtual": false,
- "hash": 3102165223,
- "return_value": {
- "type": "Dictionary"
- }
- },
- {
- "name": "get_shape_type",
- "is_const": true,
- "is_vararg": false,
- "is_static": false,
- "is_virtual": false,
- "hash": 201670096,
- "return_value": {
- "type": "String"
- }
- },
- {
- "name": "set_shape_type",
- "is_const": false,
- "is_vararg": false,
- "is_static": false,
- "is_virtual": false,
- "hash": 83702148,
- "arguments": [
- {
- "name": "shape_type",
- "type": "String"
- }
- ]
- },
- {
- "name": "get_size",
- "is_const": true,
- "is_vararg": false,
- "is_static": false,
- "is_virtual": false,
- "hash": 3360562783,
- "return_value": {
- "type": "Vector3"
- }
- },
- {
- "name": "set_size",
- "is_const": false,
- "is_vararg": false,
- "is_static": false,
- "is_virtual": false,
- "hash": 3460891852,
- "arguments": [
- {
- "name": "size",
- "type": "Vector3"
- }
- ]
- },
- {
- "name": "get_radius",
- "is_const": true,
- "is_vararg": false,
- "is_static": false,
- "is_virtual": false,
- "hash": 1740695150,
- "return_value": {
- "type": "float",
- "meta": "float"
- }
- },
- {
- "name": "set_radius",
- "is_const": false,
- "is_vararg": false,
- "is_static": false,
- "is_virtual": false,
- "hash": 373806689,
- "arguments": [
- {
- "name": "radius",
- "type": "float",
- "meta": "float"
- }
- ]
- },
- {
- "name": "get_height",
- "is_const": true,
- "is_vararg": false,
- "is_static": false,
- "is_virtual": false,
- "hash": 1740695150,
- "return_value": {
- "type": "float",
- "meta": "float"
- }
- },
- {
- "name": "set_height",
- "is_const": false,
- "is_vararg": false,
- "is_static": false,
- "is_virtual": false,
- "hash": 373806689,
- "arguments": [
- {
- "name": "height",
- "type": "float",
- "meta": "float"
- }
- ]
- },
- {
- "name": "get_is_trigger",
- "is_const": true,
- "is_vararg": false,
- "is_static": false,
- "is_virtual": false,
- "hash": 36873697,
- "return_value": {
- "type": "bool"
- }
- },
- {
- "name": "set_is_trigger",
- "is_const": false,
- "is_vararg": false,
- "is_static": false,
- "is_virtual": false,
- "hash": 2586408642,
- "arguments": [
- {
- "name": "is_trigger",
- "type": "bool"
- }
- ]
- },
- {
- "name": "get_mesh_index",
- "is_const": true,
- "is_vararg": false,
- "is_static": false,
- "is_virtual": false,
- "hash": 3905245786,
- "return_value": {
- "type": "int",
- "meta": "int32"
- }
- },
- {
- "name": "set_mesh_index",
- "is_const": false,
- "is_vararg": false,
- "is_static": false,
- "is_virtual": false,
- "hash": 1286410249,
- "arguments": [
- {
- "name": "mesh_index",
- "type": "int",
- "meta": "int32"
- }
- ]
- },
- {
- "name": "get_importer_mesh",
- "is_const": true,
- "is_vararg": false,
- "is_static": false,
- "is_virtual": false,
- "hash": 3161779525,
- "return_value": {
- "type": "ImporterMesh"
- }
- },
- {
- "name": "set_importer_mesh",
- "is_const": false,
- "is_vararg": false,
- "is_static": false,
- "is_virtual": false,
- "hash": 2255166972,
- "arguments": [
- {
- "name": "importer_mesh",
- "type": "ImporterMesh"
- }
- ]
- }
- ],
- "properties": [
- {
- "type": "String",
- "name": "shape_type",
- "setter": "set_shape_type",
- "getter": "get_shape_type"
- },
- {
- "type": "Vector3",
- "name": "size",
- "setter": "set_size",
- "getter": "get_size"
- },
- {
- "type": "float",
- "name": "radius",
- "setter": "set_radius",
- "getter": "get_radius"
- },
- {
- "type": "float",
- "name": "height",
- "setter": "set_height",
- "getter": "get_height"
- },
- {
- "type": "bool",
- "name": "is_trigger",
- "setter": "set_is_trigger",
- "getter": "get_is_trigger"
- },
- {
- "type": "int",
- "name": "mesh_index",
- "setter": "set_mesh_index",
- "getter": "get_mesh_index"
- },
- {
- "type": "ImporterMesh",
- "name": "importer_mesh",
- "setter": "set_importer_mesh",
- "getter": "get_importer_mesh"
- }
- ]
- },
- {
"name": "GLTFDocument",
"is_refcounted": true,
"is_instantiable": true,
@@ -98090,6 +97978,303 @@
]
},
{
+ "name": "GLTFPhysicsShape",
+ "is_refcounted": true,
+ "is_instantiable": true,
+ "inherits": "Resource",
+ "api_type": "core",
+ "methods": [
+ {
+ "name": "from_node",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": true,
+ "is_virtual": false,
+ "hash": 3613751275,
+ "return_value": {
+ "type": "GLTFPhysicsShape"
+ },
+ "arguments": [
+ {
+ "name": "shape_node",
+ "type": "CollisionShape3D"
+ }
+ ]
+ },
+ {
+ "name": "to_node",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 563689933,
+ "return_value": {
+ "type": "CollisionShape3D"
+ },
+ "arguments": [
+ {
+ "name": "cache_shapes",
+ "type": "bool",
+ "default_value": "false"
+ }
+ ]
+ },
+ {
+ "name": "from_dictionary",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": true,
+ "is_virtual": false,
+ "hash": 2390691823,
+ "return_value": {
+ "type": "GLTFPhysicsShape"
+ },
+ "arguments": [
+ {
+ "name": "dictionary",
+ "type": "Dictionary"
+ }
+ ]
+ },
+ {
+ "name": "to_dictionary",
+ "is_const": true,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 3102165223,
+ "return_value": {
+ "type": "Dictionary"
+ }
+ },
+ {
+ "name": "get_shape_type",
+ "is_const": true,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 201670096,
+ "return_value": {
+ "type": "String"
+ }
+ },
+ {
+ "name": "set_shape_type",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 83702148,
+ "arguments": [
+ {
+ "name": "shape_type",
+ "type": "String"
+ }
+ ]
+ },
+ {
+ "name": "get_size",
+ "is_const": true,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 3360562783,
+ "return_value": {
+ "type": "Vector3"
+ }
+ },
+ {
+ "name": "set_size",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 3460891852,
+ "arguments": [
+ {
+ "name": "size",
+ "type": "Vector3"
+ }
+ ]
+ },
+ {
+ "name": "get_radius",
+ "is_const": true,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 1740695150,
+ "return_value": {
+ "type": "float",
+ "meta": "float"
+ }
+ },
+ {
+ "name": "set_radius",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 373806689,
+ "arguments": [
+ {
+ "name": "radius",
+ "type": "float",
+ "meta": "float"
+ }
+ ]
+ },
+ {
+ "name": "get_height",
+ "is_const": true,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 1740695150,
+ "return_value": {
+ "type": "float",
+ "meta": "float"
+ }
+ },
+ {
+ "name": "set_height",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 373806689,
+ "arguments": [
+ {
+ "name": "height",
+ "type": "float",
+ "meta": "float"
+ }
+ ]
+ },
+ {
+ "name": "get_is_trigger",
+ "is_const": true,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 36873697,
+ "return_value": {
+ "type": "bool"
+ }
+ },
+ {
+ "name": "set_is_trigger",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 2586408642,
+ "arguments": [
+ {
+ "name": "is_trigger",
+ "type": "bool"
+ }
+ ]
+ },
+ {
+ "name": "get_mesh_index",
+ "is_const": true,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 3905245786,
+ "return_value": {
+ "type": "int",
+ "meta": "int32"
+ }
+ },
+ {
+ "name": "set_mesh_index",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 1286410249,
+ "arguments": [
+ {
+ "name": "mesh_index",
+ "type": "int",
+ "meta": "int32"
+ }
+ ]
+ },
+ {
+ "name": "get_importer_mesh",
+ "is_const": true,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 3161779525,
+ "return_value": {
+ "type": "ImporterMesh"
+ }
+ },
+ {
+ "name": "set_importer_mesh",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 2255166972,
+ "arguments": [
+ {
+ "name": "importer_mesh",
+ "type": "ImporterMesh"
+ }
+ ]
+ }
+ ],
+ "properties": [
+ {
+ "type": "String",
+ "name": "shape_type",
+ "setter": "set_shape_type",
+ "getter": "get_shape_type"
+ },
+ {
+ "type": "Vector3",
+ "name": "size",
+ "setter": "set_size",
+ "getter": "get_size"
+ },
+ {
+ "type": "float",
+ "name": "radius",
+ "setter": "set_radius",
+ "getter": "get_radius"
+ },
+ {
+ "type": "float",
+ "name": "height",
+ "setter": "set_height",
+ "getter": "get_height"
+ },
+ {
+ "type": "bool",
+ "name": "is_trigger",
+ "setter": "set_is_trigger",
+ "getter": "get_is_trigger"
+ },
+ {
+ "type": "int",
+ "name": "mesh_index",
+ "setter": "set_mesh_index",
+ "getter": "get_mesh_index"
+ },
+ {
+ "type": "ImporterMesh",
+ "name": "importer_mesh",
+ "setter": "set_importer_mesh",
+ "getter": "get_importer_mesh"
+ }
+ ]
+ },
+ {
"name": "GLTFSkeleton",
"is_refcounted": true,
"is_instantiable": true,
@@ -134825,6 +135010,202 @@
"type": "NavigationMesh"
}
]
+ },
+ {
+ "name": "parse_source_geometry_data",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 3703028813,
+ "arguments": [
+ {
+ "name": "navigation_mesh",
+ "type": "NavigationMesh"
+ },
+ {
+ "name": "source_geometry_data",
+ "type": "NavigationMeshSourceGeometryData3D"
+ },
+ {
+ "name": "root_node",
+ "type": "Node"
+ },
+ {
+ "name": "callback",
+ "type": "Callable",
+ "default_value": "Callable()"
+ }
+ ]
+ },
+ {
+ "name": "bake_from_source_geometry_data",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 3669016597,
+ "arguments": [
+ {
+ "name": "navigation_mesh",
+ "type": "NavigationMesh"
+ },
+ {
+ "name": "source_geometry_data",
+ "type": "NavigationMeshSourceGeometryData3D"
+ },
+ {
+ "name": "callback",
+ "type": "Callable",
+ "default_value": "Callable()"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "NavigationMeshSourceGeometryData3D",
+ "is_refcounted": true,
+ "is_instantiable": true,
+ "inherits": "Resource",
+ "api_type": "core",
+ "methods": [
+ {
+ "name": "set_vertices",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 2899603908,
+ "arguments": [
+ {
+ "name": "vertices",
+ "type": "PackedFloat32Array"
+ }
+ ]
+ },
+ {
+ "name": "get_vertices",
+ "is_const": true,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 675695659,
+ "return_value": {
+ "type": "PackedFloat32Array"
+ }
+ },
+ {
+ "name": "set_indices",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 3614634198,
+ "arguments": [
+ {
+ "name": "indices",
+ "type": "PackedInt32Array"
+ }
+ ]
+ },
+ {
+ "name": "get_indices",
+ "is_const": true,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 1930428628,
+ "return_value": {
+ "type": "PackedInt32Array"
+ }
+ },
+ {
+ "name": "clear",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 3218959716
+ },
+ {
+ "name": "has_data",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 2240911060,
+ "return_value": {
+ "type": "bool"
+ }
+ },
+ {
+ "name": "add_mesh",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 975462459,
+ "arguments": [
+ {
+ "name": "mesh",
+ "type": "Mesh"
+ },
+ {
+ "name": "xform",
+ "type": "Transform3D"
+ }
+ ]
+ },
+ {
+ "name": "add_mesh_array",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 4235710913,
+ "arguments": [
+ {
+ "name": "mesh_array",
+ "type": "Array"
+ },
+ {
+ "name": "xform",
+ "type": "Transform3D"
+ }
+ ]
+ },
+ {
+ "name": "add_faces",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 1440358797,
+ "arguments": [
+ {
+ "name": "faces",
+ "type": "PackedVector3Array"
+ },
+ {
+ "name": "xform",
+ "type": "Transform3D"
+ }
+ ]
+ }
+ ],
+ "properties": [
+ {
+ "type": "PackedVector3Array",
+ "name": "vertices",
+ "setter": "set_vertices",
+ "getter": "get_vertices"
+ },
+ {
+ "type": "PackedInt32Array",
+ "name": "indices",
+ "setter": "set_indices",
+ "getter": "get_indices"
}
]
},
@@ -138265,6 +138646,41 @@
]
},
{
+ "name": "agent_set_paused",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 1265174801,
+ "arguments": [
+ {
+ "name": "agent",
+ "type": "RID"
+ },
+ {
+ "name": "paused",
+ "type": "bool"
+ }
+ ]
+ },
+ {
+ "name": "agent_get_paused",
+ "is_const": true,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 4155700596,
+ "return_value": {
+ "type": "bool"
+ },
+ "arguments": [
+ {
+ "name": "agent",
+ "type": "RID"
+ }
+ ]
+ },
+ {
"name": "agent_set_neighbor_distance",
"is_const": false,
"is_vararg": false,
@@ -138606,6 +139022,41 @@
]
},
{
+ "name": "obstacle_set_paused",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 1265174801,
+ "arguments": [
+ {
+ "name": "obstacle",
+ "type": "RID"
+ },
+ {
+ "name": "paused",
+ "type": "bool"
+ }
+ ]
+ },
+ {
+ "name": "obstacle_get_paused",
+ "is_const": true,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 4155700596,
+ "return_value": {
+ "type": "bool"
+ },
+ "arguments": [
+ {
+ "name": "obstacle",
+ "type": "RID"
+ }
+ ]
+ },
+ {
"name": "obstacle_set_radius",
"is_const": false,
"is_vararg": false,
@@ -140088,6 +140539,41 @@
]
},
{
+ "name": "agent_set_paused",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 1265174801,
+ "arguments": [
+ {
+ "name": "agent",
+ "type": "RID"
+ },
+ {
+ "name": "paused",
+ "type": "bool"
+ }
+ ]
+ },
+ {
+ "name": "agent_get_paused",
+ "is_const": true,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 4155700596,
+ "return_value": {
+ "type": "bool"
+ },
+ "arguments": [
+ {
+ "name": "agent",
+ "type": "RID"
+ }
+ ]
+ },
+ {
"name": "agent_set_neighbor_distance",
"is_const": false,
"is_vararg": false,
@@ -140483,6 +140969,41 @@
]
},
{
+ "name": "obstacle_set_paused",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 1265174801,
+ "arguments": [
+ {
+ "name": "obstacle",
+ "type": "RID"
+ },
+ {
+ "name": "paused",
+ "type": "bool"
+ }
+ ]
+ },
+ {
+ "name": "obstacle_get_paused",
+ "is_const": true,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 4155700596,
+ "return_value": {
+ "type": "bool"
+ },
+ "arguments": [
+ {
+ "name": "obstacle",
+ "type": "RID"
+ }
+ ]
+ },
+ {
"name": "obstacle_set_radius",
"is_const": false,
"is_vararg": false,
@@ -140594,6 +141115,56 @@
]
},
{
+ "name": "parse_source_geometry_data",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 3703028813,
+ "arguments": [
+ {
+ "name": "navigation_mesh",
+ "type": "NavigationMesh"
+ },
+ {
+ "name": "source_geometry_data",
+ "type": "NavigationMeshSourceGeometryData3D"
+ },
+ {
+ "name": "root_node",
+ "type": "Node"
+ },
+ {
+ "name": "callback",
+ "type": "Callable",
+ "default_value": "Callable()"
+ }
+ ]
+ },
+ {
+ "name": "bake_from_source_geometry_data",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 3669016597,
+ "arguments": [
+ {
+ "name": "navigation_mesh",
+ "type": "NavigationMesh"
+ },
+ {
+ "name": "source_geometry_data",
+ "type": "NavigationMeshSourceGeometryData3D"
+ },
+ {
+ "name": "callback",
+ "type": "Callable",
+ "default_value": "Callable()"
+ }
+ ]
+ },
+ {
"name": "free_rid",
"is_const": false,
"is_vararg": false,
@@ -141166,7 +141737,7 @@
},
{
"name": "ProcessThreadMessages",
- "is_bitfield": false,
+ "is_bitfield": true,
"values": [
{
"name": "FLAG_PROCESS_THREAD_MESSAGES",
@@ -161867,7 +162438,7 @@
{
"name": "body_b",
"type": "RID",
- "default_value": ""
+ "default_value": "RID()"
}
]
},
@@ -161898,12 +162469,12 @@
{
"name": "body_a",
"type": "RID",
- "default_value": ""
+ "default_value": "RID()"
},
{
"name": "body_b",
"type": "RID",
- "default_value": ""
+ "default_value": "RID()"
}
]
},
@@ -161934,7 +162505,7 @@
{
"name": "body_b",
"type": "RID",
- "default_value": ""
+ "default_value": "RID()"
}
]
},
@@ -188451,6 +189022,10 @@
"value": 19
},
{
+ "name": "LIGHT_PARAM_INTENSITY",
+ "value": 20
+ },
+ {
"name": "LIGHT_PARAM_MAX",
"value": 21
}
@@ -196981,7 +197556,7 @@
{
"name": "scenario",
"type": "RID",
- "default_value": ""
+ "default_value": "RID()"
}
]
},
@@ -197007,7 +197582,7 @@
{
"name": "scenario",
"type": "RID",
- "default_value": ""
+ "default_value": "RID()"
}
]
},
@@ -197029,7 +197604,7 @@
{
"name": "scenario",
"type": "RID",
- "default_value": ""
+ "default_value": "RID()"
}
]
},
@@ -197883,7 +198458,7 @@
{
"name": "texture",
"type": "RID",
- "default_value": ""
+ "default_value": "RID()"
}
]
},
@@ -197929,7 +198504,7 @@
{
"name": "texture",
"type": "RID",
- "default_value": ""
+ "default_value": "RID()"
},
{
"name": "count",
@@ -197968,7 +198543,7 @@
{
"name": "texture",
"type": "RID",
- "default_value": ""
+ "default_value": "RID()"
}
]
},
@@ -197991,7 +198566,7 @@
{
"name": "texture",
"type": "RID",
- "default_value": ""
+ "default_value": "RID()"
}
]
},
@@ -226919,6 +227494,31 @@
}
},
{
+ "name": "set_autowrap_mode",
+ "is_const": false,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 3289138044,
+ "arguments": [
+ {
+ "name": "autowrap_mode",
+ "type": "enum::TextServer.AutowrapMode"
+ }
+ ]
+ },
+ {
+ "name": "get_autowrap_mode",
+ "is_const": true,
+ "is_vararg": false,
+ "is_static": false,
+ "is_virtual": false,
+ "hash": 1549071663,
+ "return_value": {
+ "type": "enum::TextServer.AutowrapMode"
+ }
+ },
+ {
"name": "is_line_wrapped",
"is_const": true,
"is_vararg": false,
@@ -228332,6 +228932,12 @@
"getter": "get_line_wrapping_mode"
},
{
+ "type": "int",
+ "name": "autowrap_mode",
+ "setter": "set_autowrap_mode",
+ "getter": "get_autowrap_mode"
+ },
+ {
"type": "bool",
"name": "highlight_all_occurrences",
"setter": "set_highlight_all_occurrences",
@@ -266925,7 +267531,7 @@
"is_vararg": false,
"is_virtual": true,
"return_value": {
- "type": "Object"
+ "type": "WebRTCDataChannel"
},
"arguments": [
{
@@ -269987,9 +270593,9 @@
"properties": [
{
"type": "int",
- "name": "initial_position",
- "setter": "set_initial_position",
- "getter": "get_initial_position"
+ "name": "mode",
+ "setter": "set_mode",
+ "getter": "get_mode"
},
{
"type": "String",
@@ -269998,6 +270604,12 @@
"getter": "get_title"
},
{
+ "type": "int",
+ "name": "initial_position",
+ "setter": "set_initial_position",
+ "getter": "get_initial_position"
+ },
+ {
"type": "Vector2i",
"name": "position",
"setter": "set_position",
@@ -270011,12 +270623,6 @@
},
{
"type": "int",
- "name": "mode",
- "setter": "set_mode",
- "getter": "get_mode"
- },
- {
- "type": "int",
"name": "current_screen",
"setter": "set_current_screen",
"getter": "get_current_screen"
diff --git a/gdextension/gdextension_interface.h b/gdextension/gdextension_interface.h
index 2a328c9..4d7bdf9 100644
--- a/gdextension/gdextension_interface.h
+++ b/gdextension/gdextension_interface.h
@@ -490,6 +490,7 @@ typedef struct {
/**
* @name get_godot_version
+ * @since 4.1
*
* Gets the Godot version that the GDExtension was loaded into.
*
@@ -501,6 +502,7 @@ typedef void (*GDExtensionInterfaceGetGodotVersion)(GDExtensionGodotVersion *r_g
/**
* @name mem_alloc
+ * @since 4.1
*
* Allocates memory.
*
@@ -512,6 +514,7 @@ typedef void *(*GDExtensionInterfaceMemAlloc)(size_t p_bytes);
/**
* @name mem_realloc
+ * @since 4.1
*
* Reallocates memory.
*
@@ -524,6 +527,7 @@ typedef void *(*GDExtensionInterfaceMemRealloc)(void *p_ptr, size_t p_bytes);
/**
* @name mem_free
+ * @since 4.1
*
* Frees memory.
*
@@ -535,6 +539,7 @@ typedef void (*GDExtensionInterfaceMemFree)(void *p_ptr);
/**
* @name print_error
+ * @since 4.1
*
* Logs an error to Godot's built-in debugger and to the OS terminal.
*
@@ -548,6 +553,7 @@ typedef void (*GDExtensionInterfacePrintError)(const char *p_description, const
/**
* @name print_error_with_message
+ * @since 4.1
*
* Logs an error with a message to Godot's built-in debugger and to the OS terminal.
*
@@ -562,6 +568,7 @@ typedef void (*GDExtensionInterfacePrintErrorWithMessage)(const char *p_descript
/**
* @name print_warning
+ * @since 4.1
*
* Logs a warning to Godot's built-in debugger and to the OS terminal.
*
@@ -575,6 +582,7 @@ typedef void (*GDExtensionInterfacePrintWarning)(const char *p_description, cons
/**
* @name print_warning_with_message
+ * @since 4.1
*
* Logs a warning with a message to Godot's built-in debugger and to the OS terminal.
*
@@ -589,6 +597,7 @@ typedef void (*GDExtensionInterfacePrintWarningWithMessage)(const char *p_descri
/**
* @name print_script_error
+ * @since 4.1
*
* Logs a script error to Godot's built-in debugger and to the OS terminal.
*
@@ -602,6 +611,7 @@ typedef void (*GDExtensionInterfacePrintScriptError)(const char *p_description,
/**
* @name print_script_error_with_message
+ * @since 4.1
*
* Logs a script error with a message to Godot's built-in debugger and to the OS terminal.
*
@@ -616,6 +626,7 @@ typedef void (*GDExtensionInterfacePrintScriptErrorWithMessage)(const char *p_de
/**
* @name get_native_struct_size
+ * @since 4.1
*
* Gets the size of a native struct (ex. ObjectID) in bytes.
*
@@ -629,6 +640,7 @@ typedef uint64_t (*GDExtensionInterfaceGetNativeStructSize)(GDExtensionConstStri
/**
* @name variant_new_copy
+ * @since 4.1
*
* Copies one Variant into a another.
*
@@ -639,6 +651,7 @@ typedef void (*GDExtensionInterfaceVariantNewCopy)(GDExtensionUninitializedVaria
/**
* @name variant_new_nil
+ * @since 4.1
*
* Creates a new Variant containing nil.
*
@@ -648,6 +661,7 @@ typedef void (*GDExtensionInterfaceVariantNewNil)(GDExtensionUninitializedVarian
/**
* @name variant_destroy
+ * @since 4.1
*
* Destroys a Variant.
*
@@ -657,6 +671,7 @@ typedef void (*GDExtensionInterfaceVariantDestroy)(GDExtensionVariantPtr p_self)
/**
* @name variant_call
+ * @since 4.1
*
* Calls a method on a Variant.
*
@@ -673,6 +688,7 @@ typedef void (*GDExtensionInterfaceVariantCall)(GDExtensionVariantPtr p_self, GD
/**
* @name variant_call_static
+ * @since 4.1
*
* Calls a static method on a Variant.
*
@@ -689,6 +705,7 @@ typedef void (*GDExtensionInterfaceVariantCallStatic)(GDExtensionVariantType p_t
/**
* @name variant_evaluate
+ * @since 4.1
*
* Evaluate an operator on two Variants.
*
@@ -704,6 +721,7 @@ typedef void (*GDExtensionInterfaceVariantEvaluate)(GDExtensionVariantOperator p
/**
* @name variant_set
+ * @since 4.1
*
* Sets a key on a Variant to a value.
*
@@ -718,6 +736,7 @@ typedef void (*GDExtensionInterfaceVariantSet)(GDExtensionVariantPtr p_self, GDE
/**
* @name variant_set_named
+ * @since 4.1
*
* Sets a named key on a Variant to a value.
*
@@ -732,6 +751,7 @@ typedef void (*GDExtensionInterfaceVariantSetNamed)(GDExtensionVariantPtr p_self
/**
* @name variant_set_keyed
+ * @since 4.1
*
* Sets a keyed property on a Variant to a value.
*
@@ -746,6 +766,7 @@ typedef void (*GDExtensionInterfaceVariantSetKeyed)(GDExtensionVariantPtr p_self
/**
* @name variant_set_indexed
+ * @since 4.1
*
* Sets an index on a Variant to a value.
*
@@ -759,6 +780,7 @@ typedef void (*GDExtensionInterfaceVariantSetIndexed)(GDExtensionVariantPtr p_se
/**
* @name variant_get
+ * @since 4.1
*
* Gets the value of a key from a Variant.
*
@@ -771,6 +793,7 @@ typedef void (*GDExtensionInterfaceVariantGet)(GDExtensionConstVariantPtr p_self
/**
* @name variant_get_named
+ * @since 4.1
*
* Gets the value of a named key from a Variant.
*
@@ -783,6 +806,7 @@ typedef void (*GDExtensionInterfaceVariantGetNamed)(GDExtensionConstVariantPtr p
/**
* @name variant_get_keyed
+ * @since 4.1
*
* Gets the value of a keyed property from a Variant.
*
@@ -795,6 +819,7 @@ typedef void (*GDExtensionInterfaceVariantGetKeyed)(GDExtensionConstVariantPtr p
/**
* @name variant_get_indexed
+ * @since 4.1
*
* Gets the value of an index from a Variant.
*
@@ -808,6 +833,7 @@ typedef void (*GDExtensionInterfaceVariantGetIndexed)(GDExtensionConstVariantPtr
/**
* @name variant_iter_init
+ * @since 4.1
*
* Initializes an iterator over a Variant.
*
@@ -823,6 +849,7 @@ typedef GDExtensionBool (*GDExtensionInterfaceVariantIterInit)(GDExtensionConstV
/**
* @name variant_iter_next
+ * @since 4.1
*
* Gets the next value for an iterator over a Variant.
*
@@ -838,6 +865,7 @@ typedef GDExtensionBool (*GDExtensionInterfaceVariantIterNext)(GDExtensionConstV
/**
* @name variant_iter_get
+ * @since 4.1
*
* Gets the next value for an iterator over a Variant.
*
@@ -852,6 +880,7 @@ typedef void (*GDExtensionInterfaceVariantIterGet)(GDExtensionConstVariantPtr p_
/**
* @name variant_hash
+ * @since 4.1
*
* Gets the hash of a Variant.
*
@@ -865,6 +894,7 @@ typedef GDExtensionInt (*GDExtensionInterfaceVariantHash)(GDExtensionConstVarian
/**
* @name variant_recursive_hash
+ * @since 4.1
*
* Gets the recursive hash of a Variant.
*
@@ -879,6 +909,7 @@ typedef GDExtensionInt (*GDExtensionInterfaceVariantRecursiveHash)(GDExtensionCo
/**
* @name variant_hash_compare
+ * @since 4.1
*
* Compares two Variants by their hash.
*
@@ -893,6 +924,7 @@ typedef GDExtensionBool (*GDExtensionInterfaceVariantHashCompare)(GDExtensionCon
/**
* @name variant_booleanize
+ * @since 4.1
*
* Converts a Variant to a boolean.
*
@@ -904,6 +936,7 @@ typedef GDExtensionBool (*GDExtensionInterfaceVariantBooleanize)(GDExtensionCons
/**
* @name variant_duplicate
+ * @since 4.1
*
* Duplicates a Variant.
*
@@ -915,6 +948,7 @@ typedef void (*GDExtensionInterfaceVariantDuplicate)(GDExtensionConstVariantPtr
/**
* @name variant_stringify
+ * @since 4.1
*
* Converts a Variant to a string.
*
@@ -925,6 +959,7 @@ typedef void (*GDExtensionInterfaceVariantStringify)(GDExtensionConstVariantPtr
/**
* @name variant_get_type
+ * @since 4.1
*
* Gets the type of a Variant.
*
@@ -936,6 +971,7 @@ typedef GDExtensionVariantType (*GDExtensionInterfaceVariantGetType)(GDExtension
/**
* @name variant_has_method
+ * @since 4.1
*
* Checks if a Variant has the given method.
*
@@ -948,6 +984,7 @@ typedef GDExtensionBool (*GDExtensionInterfaceVariantHasMethod)(GDExtensionConst
/**
* @name variant_has_member
+ * @since 4.1
*
* Checks if a type of Variant has the given member.
*
@@ -960,6 +997,7 @@ typedef GDExtensionBool (*GDExtensionInterfaceVariantHasMember)(GDExtensionVaria
/**
* @name variant_has_key
+ * @since 4.1
*
* Checks if a Variant has a key.
*
@@ -973,6 +1011,7 @@ typedef GDExtensionBool (*GDExtensionInterfaceVariantHasKey)(GDExtensionConstVar
/**
* @name variant_get_type_name
+ * @since 4.1
*
* Gets the name of a Variant type.
*
@@ -983,6 +1022,7 @@ typedef void (*GDExtensionInterfaceVariantGetTypeName)(GDExtensionVariantType p_
/**
* @name variant_can_convert
+ * @since 4.1
*
* Checks if Variants can be converted from one type to another.
*
@@ -995,6 +1035,7 @@ typedef GDExtensionBool (*GDExtensionInterfaceVariantCanConvert)(GDExtensionVari
/**
* @name variant_can_convert_strict
+ * @since 4.1
*
* Checks if Variant can be converted from one type to another using stricter rules.
*
@@ -1007,6 +1048,7 @@ typedef GDExtensionBool (*GDExtensionInterfaceVariantCanConvertStrict)(GDExtensi
/**
* @name get_variant_from_type_constructor
+ * @since 4.1
*
* Gets a pointer to a function that can create a Variant of the given type from a raw value.
*
@@ -1018,6 +1060,7 @@ typedef GDExtensionVariantFromTypeConstructorFunc (*GDExtensionInterfaceGetVaria
/**
* @name get_variant_to_type_constructor
+ * @since 4.1
*
* Gets a pointer to a function that can get the raw value from a Variant of the given type.
*
@@ -1029,6 +1072,7 @@ typedef GDExtensionTypeFromVariantConstructorFunc (*GDExtensionInterfaceGetVaria
/**
* @name variant_get_ptr_operator_evaluator
+ * @since 4.1
*
* Gets a pointer to a function that can evaluate the given Variant operator on the given Variant types.
*
@@ -1042,6 +1086,7 @@ typedef GDExtensionPtrOperatorEvaluator (*GDExtensionInterfaceVariantGetPtrOpera
/**
* @name variant_get_ptr_builtin_method
+ * @since 4.1
*
* Gets a pointer to a function that can call a builtin method on a type of Variant.
*
@@ -1055,6 +1100,7 @@ typedef GDExtensionPtrBuiltInMethod (*GDExtensionInterfaceVariantGetPtrBuiltinMe
/**
* @name variant_get_ptr_constructor
+ * @since 4.1
*
* Gets a pointer to a function that can call one of the constructors for a type of Variant.
*
@@ -1067,6 +1113,7 @@ typedef GDExtensionPtrConstructor (*GDExtensionInterfaceVariantGetPtrConstructor
/**
* @name variant_get_ptr_destructor
+ * @since 4.1
*
* Gets a pointer to a function than can call the destructor for a type of Variant.
*
@@ -1078,6 +1125,7 @@ typedef GDExtensionPtrDestructor (*GDExtensionInterfaceVariantGetPtrDestructor)(
/**
* @name variant_construct
+ * @since 4.1
*
* Constructs a Variant of the given type, using the first constructor that matches the given arguments.
*
@@ -1091,6 +1139,7 @@ typedef void (*GDExtensionInterfaceVariantConstruct)(GDExtensionVariantType p_ty
/**
* @name variant_get_ptr_setter
+ * @since 4.1
*
* Gets a pointer to a function that can call a member's setter on the given Variant type.
*
@@ -1103,6 +1152,7 @@ typedef GDExtensionPtrSetter (*GDExtensionInterfaceVariantGetPtrSetter)(GDExtens
/**
* @name variant_get_ptr_getter
+ * @since 4.1
*
* Gets a pointer to a function that can call a member's getter on the given Variant type.
*
@@ -1115,6 +1165,7 @@ typedef GDExtensionPtrGetter (*GDExtensionInterfaceVariantGetPtrGetter)(GDExtens
/**
* @name variant_get_ptr_indexed_setter
+ * @since 4.1
*
* Gets a pointer to a function that can set an index on the given Variant type.
*
@@ -1126,6 +1177,7 @@ typedef GDExtensionPtrIndexedSetter (*GDExtensionInterfaceVariantGetPtrIndexedSe
/**
* @name variant_get_ptr_indexed_getter
+ * @since 4.1
*
* Gets a pointer to a function that can get an index on the given Variant type.
*
@@ -1137,6 +1189,7 @@ typedef GDExtensionPtrIndexedGetter (*GDExtensionInterfaceVariantGetPtrIndexedGe
/**
* @name variant_get_ptr_keyed_setter
+ * @since 4.1
*
* Gets a pointer to a function that can set a key on the given Variant type.
*
@@ -1148,6 +1201,7 @@ typedef GDExtensionPtrKeyedSetter (*GDExtensionInterfaceVariantGetPtrKeyedSetter
/**
* @name variant_get_ptr_keyed_getter
+ * @since 4.1
*
* Gets a pointer to a function that can get a key on the given Variant type.
*
@@ -1159,6 +1213,7 @@ typedef GDExtensionPtrKeyedGetter (*GDExtensionInterfaceVariantGetPtrKeyedGetter
/**
* @name variant_get_ptr_keyed_checker
+ * @since 4.1
*
* Gets a pointer to a function that can check a key on the given Variant type.
*
@@ -1170,6 +1225,7 @@ typedef GDExtensionPtrKeyedChecker (*GDExtensionInterfaceVariantGetPtrKeyedCheck
/**
* @name variant_get_constant_value
+ * @since 4.1
*
* Gets the value of a constant from the given Variant type.
*
@@ -1181,6 +1237,7 @@ typedef void (*GDExtensionInterfaceVariantGetConstantValue)(GDExtensionVariantTy
/**
* @name variant_get_ptr_utility_function
+ * @since 4.1
*
* Gets a pointer to a function that can call a Variant utility function.
*
@@ -1195,6 +1252,7 @@ typedef GDExtensionPtrUtilityFunction (*GDExtensionInterfaceVariantGetPtrUtility
/**
* @name string_new_with_latin1_chars
+ * @since 4.1
*
* Creates a String from a Latin-1 encoded C string.
*
@@ -1205,6 +1263,7 @@ typedef void (*GDExtensionInterfaceStringNewWithLatin1Chars)(GDExtensionUninitia
/**
* @name string_new_with_utf8_chars
+ * @since 4.1
*
* Creates a String from a UTF-8 encoded C string.
*
@@ -1215,6 +1274,7 @@ typedef void (*GDExtensionInterfaceStringNewWithUtf8Chars)(GDExtensionUninitiali
/**
* @name string_new_with_utf16_chars
+ * @since 4.1
*
* Creates a String from a UTF-16 encoded C string.
*
@@ -1225,6 +1285,7 @@ typedef void (*GDExtensionInterfaceStringNewWithUtf16Chars)(GDExtensionUninitial
/**
* @name string_new_with_utf32_chars
+ * @since 4.1
*
* Creates a String from a UTF-32 encoded C string.
*
@@ -1235,6 +1296,7 @@ typedef void (*GDExtensionInterfaceStringNewWithUtf32Chars)(GDExtensionUninitial
/**
* @name string_new_with_wide_chars
+ * @since 4.1
*
* Creates a String from a wide C string.
*
@@ -1245,6 +1307,7 @@ typedef void (*GDExtensionInterfaceStringNewWithWideChars)(GDExtensionUninitiali
/**
* @name string_new_with_latin1_chars_and_len
+ * @since 4.1
*
* Creates a String from a Latin-1 encoded C string with the given length.
*
@@ -1256,6 +1319,7 @@ typedef void (*GDExtensionInterfaceStringNewWithLatin1CharsAndLen)(GDExtensionUn
/**
* @name string_new_with_utf8_chars_and_len
+ * @since 4.1
*
* Creates a String from a UTF-8 encoded C string with the given length.
*
@@ -1267,6 +1331,7 @@ typedef void (*GDExtensionInterfaceStringNewWithUtf8CharsAndLen)(GDExtensionUnin
/**
* @name string_new_with_utf16_chars_and_len
+ * @since 4.1
*
* Creates a String from a UTF-16 encoded C string with the given length.
*
@@ -1278,6 +1343,7 @@ typedef void (*GDExtensionInterfaceStringNewWithUtf16CharsAndLen)(GDExtensionUni
/**
* @name string_new_with_utf32_chars_and_len
+ * @since 4.1
*
* Creates a String from a UTF-32 encoded C string with the given length.
*
@@ -1289,6 +1355,7 @@ typedef void (*GDExtensionInterfaceStringNewWithUtf32CharsAndLen)(GDExtensionUni
/**
* @name string_new_with_wide_chars_and_len
+ * @since 4.1
*
* Creates a String from a wide C string with the given length.
*
@@ -1300,6 +1367,7 @@ typedef void (*GDExtensionInterfaceStringNewWithWideCharsAndLen)(GDExtensionUnin
/**
* @name string_to_latin1_chars
+ * @since 4.1
*
* Converts a String to a Latin-1 encoded C string.
*
@@ -1315,6 +1383,7 @@ typedef GDExtensionInt (*GDExtensionInterfaceStringToLatin1Chars)(GDExtensionCon
/**
* @name string_to_utf8_chars
+ * @since 4.1
*
* Converts a String to a UTF-8 encoded C string.
*
@@ -1330,6 +1399,7 @@ typedef GDExtensionInt (*GDExtensionInterfaceStringToUtf8Chars)(GDExtensionConst
/**
* @name string_to_utf16_chars
+ * @since 4.1
*
* Converts a String to a UTF-16 encoded C string.
*
@@ -1345,6 +1415,7 @@ typedef GDExtensionInt (*GDExtensionInterfaceStringToUtf16Chars)(GDExtensionCons
/**
* @name string_to_utf32_chars
+ * @since 4.1
*
* Converts a String to a UTF-32 encoded C string.
*
@@ -1360,6 +1431,7 @@ typedef GDExtensionInt (*GDExtensionInterfaceStringToUtf32Chars)(GDExtensionCons
/**
* @name string_to_wide_chars
+ * @since 4.1
*
* Converts a String to a wide C string.
*
@@ -1375,6 +1447,7 @@ typedef GDExtensionInt (*GDExtensionInterfaceStringToWideChars)(GDExtensionConst
/**
* @name string_operator_index
+ * @since 4.1
*
* Gets a pointer to the character at the given index from a String.
*
@@ -1387,6 +1460,7 @@ typedef char32_t *(*GDExtensionInterfaceStringOperatorIndex)(GDExtensionStringPt
/**
* @name string_operator_index_const
+ * @since 4.1
*
* Gets a const pointer to the character at the given index from a String.
*
@@ -1399,6 +1473,7 @@ typedef const char32_t *(*GDExtensionInterfaceStringOperatorIndexConst)(GDExtens
/**
* @name string_operator_plus_eq_string
+ * @since 4.1
*
* Appends another String to a String.
*
@@ -1409,6 +1484,7 @@ typedef void (*GDExtensionInterfaceStringOperatorPlusEqString)(GDExtensionString
/**
* @name string_operator_plus_eq_char
+ * @since 4.1
*
* Appends a character to a String.
*
@@ -1419,6 +1495,7 @@ typedef void (*GDExtensionInterfaceStringOperatorPlusEqChar)(GDExtensionStringPt
/**
* @name string_operator_plus_eq_cstr
+ * @since 4.1
*
* Appends a Latin-1 encoded C string to a String.
*
@@ -1429,6 +1506,7 @@ typedef void (*GDExtensionInterfaceStringOperatorPlusEqCstr)(GDExtensionStringPt
/**
* @name string_operator_plus_eq_wcstr
+ * @since 4.1
*
* Appends a wide C string to a String.
*
@@ -1439,6 +1517,7 @@ typedef void (*GDExtensionInterfaceStringOperatorPlusEqWcstr)(GDExtensionStringP
/**
* @name string_operator_plus_eq_c32str
+ * @since 4.1
*
* Appends a UTF-32 encoded C string to a String.
*
@@ -1451,6 +1530,7 @@ typedef void (*GDExtensionInterfaceStringOperatorPlusEqC32str)(GDExtensionString
/**
* @name xml_parser_open_buffer
+ * @since 4.1
*
* Opens a raw XML buffer on an XMLParser instance.
*
@@ -1468,6 +1548,7 @@ typedef GDExtensionInt (*GDExtensionInterfaceXmlParserOpenBuffer)(GDExtensionObj
/**
* @name file_access_store_buffer
+ * @since 4.1
*
* Stores the given buffer using an instance of FileAccess.
*
@@ -1481,6 +1562,7 @@ typedef void (*GDExtensionInterfaceFileAccessStoreBuffer)(GDExtensionObjectPtr p
/**
* @name file_access_get_buffer
+ * @since 4.1
*
* Reads the next p_length bytes into the given buffer using an instance of FileAccess.
*
@@ -1496,6 +1578,7 @@ typedef uint64_t (*GDExtensionInterfaceFileAccessGetBuffer)(GDExtensionConstObje
/**
* @name worker_thread_pool_add_native_group_task
+ * @since 4.1
*
* Adds a group task to an instance of WorkerThreadPool.
*
@@ -1514,6 +1597,7 @@ typedef int64_t (*GDExtensionInterfaceWorkerThreadPoolAddNativeGroupTask)(GDExte
/**
* @name worker_thread_pool_add_native_task
+ * @since 4.1
*
* Adds a task to an instance of WorkerThreadPool.
*
@@ -1531,6 +1615,7 @@ typedef int64_t (*GDExtensionInterfaceWorkerThreadPoolAddNativeTask)(GDExtension
/**
* @name packed_byte_array_operator_index
+ * @since 4.1
*
* Gets a pointer to a byte in a PackedByteArray.
*
@@ -1543,6 +1628,7 @@ typedef uint8_t *(*GDExtensionInterfacePackedByteArrayOperatorIndex)(GDExtension
/**
* @name packed_byte_array_operator_index_const
+ * @since 4.1
*
* Gets a const pointer to a byte in a PackedByteArray.
*
@@ -1555,6 +1641,7 @@ typedef const uint8_t *(*GDExtensionInterfacePackedByteArrayOperatorIndexConst)(
/**
* @name packed_color_array_operator_index
+ * @since 4.1
*
* Gets a pointer to a color in a PackedColorArray.
*
@@ -1567,6 +1654,7 @@ typedef GDExtensionTypePtr (*GDExtensionInterfacePackedColorArrayOperatorIndex)(
/**
* @name packed_color_array_operator_index_const
+ * @since 4.1
*
* Gets a const pointer to a color in a PackedColorArray.
*
@@ -1579,6 +1667,7 @@ typedef GDExtensionTypePtr (*GDExtensionInterfacePackedColorArrayOperatorIndexCo
/**
* @name packed_float32_array_operator_index
+ * @since 4.1
*
* Gets a pointer to a 32-bit float in a PackedFloat32Array.
*
@@ -1591,6 +1680,7 @@ typedef float *(*GDExtensionInterfacePackedFloat32ArrayOperatorIndex)(GDExtensio
/**
* @name packed_float32_array_operator_index_const
+ * @since 4.1
*
* Gets a const pointer to a 32-bit float in a PackedFloat32Array.
*
@@ -1603,6 +1693,7 @@ typedef const float *(*GDExtensionInterfacePackedFloat32ArrayOperatorIndexConst)
/**
* @name packed_float64_array_operator_index
+ * @since 4.1
*
* Gets a pointer to a 64-bit float in a PackedFloat64Array.
*
@@ -1615,6 +1706,7 @@ typedef double *(*GDExtensionInterfacePackedFloat64ArrayOperatorIndex)(GDExtensi
/**
* @name packed_float64_array_operator_index_const
+ * @since 4.1
*
* Gets a const pointer to a 64-bit float in a PackedFloat64Array.
*
@@ -1627,6 +1719,7 @@ typedef const double *(*GDExtensionInterfacePackedFloat64ArrayOperatorIndexConst
/**
* @name packed_int32_array_operator_index
+ * @since 4.1
*
* Gets a pointer to a 32-bit integer in a PackedInt32Array.
*
@@ -1639,6 +1732,7 @@ typedef int32_t *(*GDExtensionInterfacePackedInt32ArrayOperatorIndex)(GDExtensio
/**
* @name packed_int32_array_operator_index_const
+ * @since 4.1
*
* Gets a const pointer to a 32-bit integer in a PackedInt32Array.
*
@@ -1651,6 +1745,7 @@ typedef const int32_t *(*GDExtensionInterfacePackedInt32ArrayOperatorIndexConst)
/**
* @name packed_int64_array_operator_index
+ * @since 4.1
*
* Gets a pointer to a 64-bit integer in a PackedInt64Array.
*
@@ -1663,6 +1758,7 @@ typedef int64_t *(*GDExtensionInterfacePackedInt64ArrayOperatorIndex)(GDExtensio
/**
* @name packed_int64_array_operator_index_const
+ * @since 4.1
*
* Gets a const pointer to a 64-bit integer in a PackedInt64Array.
*
@@ -1675,6 +1771,7 @@ typedef const int64_t *(*GDExtensionInterfacePackedInt64ArrayOperatorIndexConst)
/**
* @name packed_string_array_operator_index
+ * @since 4.1
*
* Gets a pointer to a string in a PackedStringArray.
*
@@ -1687,6 +1784,7 @@ typedef GDExtensionStringPtr (*GDExtensionInterfacePackedStringArrayOperatorInde
/**
* @name packed_string_array_operator_index_const
+ * @since 4.1
*
* Gets a const pointer to a string in a PackedStringArray.
*
@@ -1699,6 +1797,7 @@ typedef GDExtensionStringPtr (*GDExtensionInterfacePackedStringArrayOperatorInde
/**
* @name packed_vector2_array_operator_index
+ * @since 4.1
*
* Gets a pointer to a Vector2 in a PackedVector2Array.
*
@@ -1711,6 +1810,7 @@ typedef GDExtensionTypePtr (*GDExtensionInterfacePackedVector2ArrayOperatorIndex
/**
* @name packed_vector2_array_operator_index_const
+ * @since 4.1
*
* Gets a const pointer to a Vector2 in a PackedVector2Array.
*
@@ -1723,6 +1823,7 @@ typedef GDExtensionTypePtr (*GDExtensionInterfacePackedVector2ArrayOperatorIndex
/**
* @name packed_vector3_array_operator_index
+ * @since 4.1
*
* Gets a pointer to a Vector3 in a PackedVector3Array.
*
@@ -1735,6 +1836,7 @@ typedef GDExtensionTypePtr (*GDExtensionInterfacePackedVector3ArrayOperatorIndex
/**
* @name packed_vector3_array_operator_index_const
+ * @since 4.1
*
* Gets a const pointer to a Vector3 in a PackedVector3Array.
*
@@ -1747,6 +1849,7 @@ typedef GDExtensionTypePtr (*GDExtensionInterfacePackedVector3ArrayOperatorIndex
/**
* @name array_operator_index
+ * @since 4.1
*
* Gets a pointer to a Variant in an Array.
*
@@ -1759,6 +1862,7 @@ typedef GDExtensionVariantPtr (*GDExtensionInterfaceArrayOperatorIndex)(GDExtens
/**
* @name array_operator_index_const
+ * @since 4.1
*
* Gets a const pointer to a Variant in an Array.
*
@@ -1771,6 +1875,7 @@ typedef GDExtensionVariantPtr (*GDExtensionInterfaceArrayOperatorIndexConst)(GDE
/**
* @name array_ref
+ * @since 4.1
*
* Sets an Array to be a reference to another Array object.
*
@@ -1781,6 +1886,7 @@ typedef void (*GDExtensionInterfaceArrayRef)(GDExtensionTypePtr p_self, GDExtens
/**
* @name array_set_typed
+ * @since 4.1
*
* Makes an Array into a typed Array.
*
@@ -1795,6 +1901,7 @@ typedef void (*GDExtensionInterfaceArraySetTyped)(GDExtensionTypePtr p_self, GDE
/**
* @name dictionary_operator_index
+ * @since 4.1
*
* Gets a pointer to a Variant in a Dictionary with the given key.
*
@@ -1807,6 +1914,7 @@ typedef GDExtensionVariantPtr (*GDExtensionInterfaceDictionaryOperatorIndex)(GDE
/**
* @name dictionary_operator_index_const
+ * @since 4.1
*
* Gets a const pointer to a Variant in a Dictionary with the given key.
*
@@ -1821,6 +1929,7 @@ typedef GDExtensionVariantPtr (*GDExtensionInterfaceDictionaryOperatorIndexConst
/**
* @name object_method_bind_call
+ * @since 4.1
*
* Calls a method on an Object.
*
@@ -1835,6 +1944,7 @@ typedef void (*GDExtensionInterfaceObjectMethodBindCall)(GDExtensionMethodBindPt
/**
* @name object_method_bind_ptrcall
+ * @since 4.1
*
* Calls a method on an Object (using a "ptrcall").
*
@@ -1847,6 +1957,7 @@ typedef void (*GDExtensionInterfaceObjectMethodBindPtrcall)(GDExtensionMethodBin
/**
* @name object_destroy
+ * @since 4.1
*
* Destroys an Object.
*
@@ -1856,6 +1967,7 @@ typedef void (*GDExtensionInterfaceObjectDestroy)(GDExtensionObjectPtr p_o);
/**
* @name global_get_singleton
+ * @since 4.1
*
* Gets a global singleton by name.
*
@@ -1867,6 +1979,7 @@ typedef GDExtensionObjectPtr (*GDExtensionInterfaceGlobalGetSingleton)(GDExtensi
/**
* @name object_get_instance_binding
+ * @since 4.1
*
* Gets a pointer representing an Object's instance binding.
*
@@ -1880,6 +1993,7 @@ typedef void *(*GDExtensionInterfaceObjectGetInstanceBinding)(GDExtensionObjectP
/**
* @name object_set_instance_binding
+ * @since 4.1
*
* Sets an Object's instance binding.
*
@@ -1892,6 +2006,7 @@ typedef void (*GDExtensionInterfaceObjectSetInstanceBinding)(GDExtensionObjectPt
/**
* @name object_set_instance
+ * @since 4.1
*
* Sets an extension class instance on a Object.
*
@@ -1903,6 +2018,7 @@ typedef void (*GDExtensionInterfaceObjectSetInstance)(GDExtensionObjectPtr p_o,
/**
* @name object_get_class_name
+ * @since 4.1
*
* Gets the class name of an Object.
*
@@ -1916,6 +2032,7 @@ typedef GDExtensionBool (*GDExtensionInterfaceObjectGetClassName)(GDExtensionCon
/**
* @name object_cast_to
+ * @since 4.1
*
* Casts an Object to a different type.
*
@@ -1928,6 +2045,7 @@ typedef GDExtensionObjectPtr (*GDExtensionInterfaceObjectCastTo)(GDExtensionCons
/**
* @name object_get_instance_from_id
+ * @since 4.1
*
* Gets an Object by its instance ID.
*
@@ -1939,6 +2057,7 @@ typedef GDExtensionObjectPtr (*GDExtensionInterfaceObjectGetInstanceFromId)(GDOb
/**
* @name object_get_instance_id
+ * @since 4.1
*
* Gets the instance ID from an Object.
*
@@ -1952,6 +2071,7 @@ typedef GDObjectInstanceID (*GDExtensionInterfaceObjectGetInstanceId)(GDExtensio
/**
* @name ref_get_object
+ * @since 4.1
*
* Gets the Object from a reference.
*
@@ -1963,6 +2083,7 @@ typedef GDExtensionObjectPtr (*GDExtensionInterfaceRefGetObject)(GDExtensionCons
/**
* @name ref_set_object
+ * @since 4.1
*
* Sets the Object referred to by a reference.
*
@@ -1975,6 +2096,7 @@ typedef void (*GDExtensionInterfaceRefSetObject)(GDExtensionRefPtr p_ref, GDExte
/**
* @name script_instance_create
+ * @since 4.1
*
* Creates a script instance that contains the given info and instance data.
*
@@ -1989,6 +2111,7 @@ typedef GDExtensionScriptInstancePtr (*GDExtensionInterfaceScriptInstanceCreate)
/**
* @name classdb_construct_object
+ * @since 4.1
*
* Constructs an Object of the requested class.
*
@@ -2002,6 +2125,7 @@ typedef GDExtensionObjectPtr (*GDExtensionInterfaceClassdbConstructObject)(GDExt
/**
* @name classdb_get_method_bind
+ * @since 4.1
*
* Gets a pointer to the MethodBind in ClassDB for the given class, method and hash.
*
@@ -2015,6 +2139,7 @@ typedef GDExtensionMethodBindPtr (*GDExtensionInterfaceClassdbGetMethodBind)(GDE
/**
* @name classdb_get_class_tag
+ * @since 4.1
*
* Gets a pointer uniquely identifying the given built-in class in the ClassDB.
*
@@ -2028,6 +2153,7 @@ typedef void *(*GDExtensionInterfaceClassdbGetClassTag)(GDExtensionConstStringNa
/**
* @name classdb_register_extension_class
+ * @since 4.1
*
* Registers an extension class in the ClassDB.
*
@@ -2042,6 +2168,7 @@ typedef void (*GDExtensionInterfaceClassdbRegisterExtensionClass)(GDExtensionCla
/**
* @name classdb_register_extension_class_method
+ * @since 4.1
*
* Registers a method on an extension class in the ClassDB.
*
@@ -2055,6 +2182,7 @@ typedef void (*GDExtensionInterfaceClassdbRegisterExtensionClassMethod)(GDExtens
/**
* @name classdb_register_extension_class_integer_constant
+ * @since 4.1
*
* Registers an integer constant on an extension class in the ClassDB.
*
@@ -2069,6 +2197,7 @@ typedef void (*GDExtensionInterfaceClassdbRegisterExtensionClassIntegerConstant)
/**
* @name classdb_register_extension_class_property
+ * @since 4.1
*
* Registers a property on an extension class in the ClassDB.
*
@@ -2084,6 +2213,7 @@ typedef void (*GDExtensionInterfaceClassdbRegisterExtensionClassProperty)(GDExte
/**
* @name classdb_register_extension_class_property_group
+ * @since 4.1
*
* Registers a property group on an extension class in the ClassDB.
*
@@ -2096,6 +2226,7 @@ typedef void (*GDExtensionInterfaceClassdbRegisterExtensionClassPropertyGroup)(G
/**
* @name classdb_register_extension_class_property_subgroup
+ * @since 4.1
*
* Registers a property subgroup on an extension class in the ClassDB.
*
@@ -2108,6 +2239,7 @@ typedef void (*GDExtensionInterfaceClassdbRegisterExtensionClassPropertySubgroup
/**
* @name classdb_register_extension_class_signal
+ * @since 4.1
*
* Registers a signal on an extension class in the ClassDB.
*
@@ -2123,6 +2255,7 @@ typedef void (*GDExtensionInterfaceClassdbRegisterExtensionClassSignal)(GDExtens
/**
* @name classdb_unregister_extension_class
+ * @since 4.1
*
* Unregisters an extension class in the ClassDB.
*
@@ -2133,6 +2266,7 @@ typedef void (*GDExtensionInterfaceClassdbUnregisterExtensionClass)(GDExtensionC
/**
* @name get_library_path
+ * @since 4.1
*
* Gets the path to the current GDExtension library.
*
@@ -2143,6 +2277,7 @@ typedef void (*GDExtensionInterfaceGetLibraryPath)(GDExtensionClassLibraryPtr p_
/**
* @name editor_add_plugin
+ * @since 4.1
*
* Adds an editor plugin.
*
@@ -2154,6 +2289,7 @@ typedef void (*GDExtensionInterfaceEditorAddPlugin)(GDExtensionConstStringNamePt
/**
* @name editor_remove_plugin
+ * @since 4.1
*
* Removes an editor plugin.
*
diff --git a/src/godot.cpp b/src/godot.cpp
index 08e509b..e6ad172 100644
--- a/src/godot.cpp
+++ b/src/godot.cpp
@@ -428,14 +428,3 @@ GDExtensionBool GDExtensionBinding::InitObject::init() const {
}
} // namespace godot
-
-extern "C" {
-
-void GDE_EXPORT initialize_level(void *userdata, GDExtensionInitializationLevel p_level) {
- godot::GDExtensionBinding::initialize_level(userdata, p_level);
-}
-
-void GDE_EXPORT deinitialize_level(void *userdata, GDExtensionInitializationLevel p_level) {
- godot::GDExtensionBinding::deinitialize_level(userdata, p_level);
-}
-}
diff --git a/test/project/main.gd b/test/project/main.gd
index fd4152b..cedd512 100644
--- a/test/project/main.gd
+++ b/test/project/main.gd
@@ -105,6 +105,13 @@ func _ready():
assert_equal(example.test_bitfield(0), 0)
assert_equal(example.test_bitfield(Example.FLAG_ONE | Example.FLAG_TWO), 3)
+ # RPCs.
+ assert_equal(example.return_last_rpc_arg(), 0)
+ example.test_rpc(42)
+ assert_equal(example.return_last_rpc_arg(), 42)
+ example.test_send_rpc(100)
+ assert_equal(example.return_last_rpc_arg(), 100)
+
# Virtual method.
var event = InputEventKey.new()
event.key_label = KEY_H
diff --git a/test/src/example.cpp b/test/src/example.cpp
index 6d67931..fb47dd8 100644
--- a/test/src/example.cpp
+++ b/test/src/example.cpp
@@ -9,6 +9,8 @@
#include <godot_cpp/classes/global_constants.hpp>
#include <godot_cpp/classes/label.hpp>
+#include <godot_cpp/classes/multiplayer_api.hpp>
+#include <godot_cpp/classes/multiplayer_peer.hpp>
#include <godot_cpp/variant/utility_functions.hpp>
using namespace godot;
@@ -48,6 +50,14 @@ int Example::def_args(int p_a, int p_b) {
}
void Example::_notification(int p_what) {
+ if (p_what == NOTIFICATION_READY) {
+ Dictionary opts;
+ opts["rpc_mode"] = MultiplayerAPI::RPC_MODE_AUTHORITY;
+ opts["transfer_mode"] = MultiplayerPeer::TRANSFER_MODE_RELIABLE;
+ opts["call_local"] = true;
+ opts["channel"] = 0;
+ rpc_config("test_rpc", opts);
+ }
//UtilityFunctions::print("Notification: ", String::num(p_what));
}
@@ -133,6 +143,10 @@ void Example::_bind_methods() {
ClassDB::bind_method(D_METHOD("test_bitfield", "flags"), &Example::test_bitfield);
+ ClassDB::bind_method(D_METHOD("test_rpc", "value"), &Example::test_rpc);
+ ClassDB::bind_method(D_METHOD("test_send_rpc", "value"), &Example::test_send_rpc);
+ ClassDB::bind_method(D_METHOD("return_last_rpc_arg"), &Example::return_last_rpc_arg);
+
ClassDB::bind_method(D_METHOD("def_args", "a", "b"), &Example::def_args, DEFVAL(100), DEFVAL(200));
ClassDB::bind_static_method("Example", D_METHOD("test_static", "a", "b"), &Example::test_static);
@@ -338,6 +352,18 @@ BitField<Example::Flags> Example::test_bitfield(BitField<Flags> flags) {
return flags;
}
+void Example::test_rpc(int p_value) {
+ last_rpc_arg = p_value;
+}
+
+void Example::test_send_rpc(int p_value) {
+ rpc("test_rpc", p_value);
+}
+
+int Example::return_last_rpc_arg() {
+ return last_rpc_arg;
+}
+
// Properties.
void Example::set_custom_position(const Vector2 &pos) {
custom_position = pos;
diff --git a/test/src/example.h b/test/src/example.h
index 3553763..a84efed 100644
--- a/test/src/example.h
+++ b/test/src/example.h
@@ -70,6 +70,7 @@ private:
Vector2 custom_position;
Vector3 property_from_list;
Vector2 dprop[3];
+ int last_rpc_arg = 0;
public:
// Constants.
@@ -121,6 +122,11 @@ public:
BitField<Flags> test_bitfield(BitField<Flags> flags);
+ // RPC
+ void test_rpc(int p_value);
+ void test_send_rpc(int p_value);
+ int return_last_rpc_arg();
+
// Property.
void set_custom_position(const Vector2 &pos);
Vector2 get_custom_position() const;
diff --git a/tools/windows.py b/tools/windows.py
index e64695a..b8690c5 100644
--- a/tools/windows.py
+++ b/tools/windows.py
@@ -30,7 +30,7 @@ def generate(env):
env.Tool("mslink")
env.Append(CPPDEFINES=["TYPED_METHOD_BIND", "NOMINMAX"])
- env.Append(CCFLAGS=["/EHsc"])
+ env.Append(CCFLAGS=["/EHsc", "/utf-8"])
env.Append(LINKFLAGS=["/WX"])
if env["use_clang_cl"]: