diff --git a/binding_generator.py b/binding_generator.py index c6ac0195..ebfe9d12 100644 --- a/binding_generator.py +++ b/binding_generator.py @@ -1058,6 +1058,7 @@ def generate_engine_class_source(class_api, used_classes, fully_used_classes, us add_header(f"{snake_class_name}.cpp", result) result.append(f"#include ") + result.append(f"#include ") result.append("") result.append(f"#include ") result.append(f"#include ") @@ -1163,7 +1164,11 @@ def generate_engine_class_source(class_api, used_classes, fully_used_classes, us result.append(method_call) if vararg and ("return_value" in method and method["return_value"]["type"] != "void"): - result.append("\treturn ret;") + return_type = method["return_value"]["type"].replace("enum::", "") + if return_type != "Variant": + result.append(f"\treturn VariantCaster<{return_type}>::cast(ret);") + else: + result.append("\treturn ret;") result.append("}") result.append("") diff --git a/godot-headers/extension_api.json b/godot-headers/extension_api.json index 943e5b01..b7b866f1 100644 --- a/godot-headers/extension_api.json +++ b/godot-headers/extension_api.json @@ -13552,6 +13552,22 @@ "is_static": false, "hash": 171192842 }, + { + "name": "to_linear", + "return_type": "Color", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 171193304 + }, + { + "name": "to_srgb", + "return_type": "Color", + "is_vararg": false, + "is_const": true, + "is_static": false, + "hash": 171193304 + }, { "name": "is_equal_approx", "return_type": "bool", @@ -18476,7 +18492,470 @@ ] }, { - "name": "AStar", + "name": "AStar2D", + "is_refcounted": true, + "is_instantiable": true, + "inherits": "RefCounted", + "api_type": "core", + "methods": [ + { + "name": "_estimate_cost", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "float" + }, + "arguments": [ + { + "name": "from_id", + "type": "int" + }, + { + "name": "to_id", + "type": "int" + } + ] + }, + { + "name": "_compute_cost", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "float" + }, + "arguments": [ + { + "name": "from_id", + "type": "int" + }, + { + "name": "to_id", + "type": "int" + } + ] + }, + { + "name": "get_available_point_id", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "add_point", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135649961, + "arguments": [ + { + "name": "id", + "type": "int", + "meta": "int32" + }, + { + "name": "position", + "type": "Vector2" + }, + { + "name": "weight_scale", + "type": "float", + "meta": "float", + "default_value": "1.0" + } + ] + }, + { + "name": "get_point_position", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135374120, + "return_value": { + "type": "Vector2" + }, + "arguments": [ + { + "name": "id", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_point_position", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134224103, + "arguments": [ + { + "name": "id", + "type": "int", + "meta": "int32" + }, + { + "name": "position", + "type": "Vector2" + } + ] + }, + { + "name": "get_point_weight_scale", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135374120, + "return_value": { + "type": "float", + "meta": "float" + }, + "arguments": [ + { + "name": "id", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "set_point_weight_scale", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134224103, + "arguments": [ + { + "name": "id", + "type": "int", + "meta": "int32" + }, + { + "name": "weight_scale", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "remove_point", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "id", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "has_point", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135374120, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "id", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_point_connections", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135374087, + "return_value": { + "type": "PackedInt32Array" + }, + "arguments": [ + { + "name": "id", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_point_ids", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338150, + "return_value": { + "type": "Array" + } + }, + { + "name": "set_point_disabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134464040, + "arguments": [ + { + "name": "id", + "type": "int", + "meta": "int32" + }, + { + "name": "disabled", + "type": "bool", + "default_value": "true" + } + ] + }, + { + "name": "is_point_disabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135374120, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "id", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "connect_points", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135649961, + "arguments": [ + { + "name": "id", + "type": "int", + "meta": "int32" + }, + { + "name": "to_id", + "type": "int", + "meta": "int32" + }, + { + "name": "bidirectional", + "type": "bool", + "default_value": "true" + } + ] + }, + { + "name": "disconnect_points", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134224103, + "arguments": [ + { + "name": "id", + "type": "int", + "meta": "int32" + }, + { + "name": "to_id", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "are_points_connected", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135410057, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "id", + "type": "int", + "meta": "int32" + }, + { + "name": "to_id", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_point_count", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "get_point_capacity", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "reserve_space", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "num_nodes", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "clear", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134152229 + }, + { + "name": "get_closest_point", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 173599466, + "return_value": { + "type": "int", + "meta": "int32" + }, + "arguments": [ + { + "name": "to_position", + "type": "Vector2" + }, + { + "name": "include_disabled", + "type": "bool", + "default_value": "false" + } + ] + }, + { + "name": "get_closest_position_in_segment", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135374120, + "return_value": { + "type": "Vector2" + }, + "arguments": [ + { + "name": "to_position", + "type": "Vector2" + } + ] + }, + { + "name": "get_point_path", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135410024, + "return_value": { + "type": "PackedVector2Array" + }, + "arguments": [ + { + "name": "from_id", + "type": "int", + "meta": "int32" + }, + { + "name": "to_id", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_id_path", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135410024, + "return_value": { + "type": "PackedInt32Array" + }, + "arguments": [ + { + "name": "from_id", + "type": "int", + "meta": "int32" + }, + { + "name": "to_id", + "type": "int", + "meta": "int32" + } + ] + } + ] + }, + { + "name": "AStar3D", "is_refcounted": true, "is_instantiable": true, "inherits": "RefCounted", @@ -18948,469 +19427,6 @@ } ] }, - { - "name": "AStar2D", - "is_refcounted": true, - "is_instantiable": true, - "inherits": "RefCounted", - "api_type": "core", - "methods": [ - { - "name": "_estimate_cost", - "is_const": true, - "is_static": false, - "is_vararg": false, - "is_virtual": true, - "return_value": { - "type": "float" - }, - "arguments": [ - { - "name": "from_id", - "type": "int" - }, - { - "name": "to_id", - "type": "int" - } - ] - }, - { - "name": "_compute_cost", - "is_const": true, - "is_static": false, - "is_vararg": false, - "is_virtual": true, - "return_value": { - "type": "float" - }, - "arguments": [ - { - "name": "from_id", - "type": "int" - }, - { - "name": "to_id", - "type": "int" - } - ] - }, - { - "name": "get_available_point_id", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135338183, - "return_value": { - "type": "int", - "meta": "int32" - } - }, - { - "name": "add_point", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135649961, - "arguments": [ - { - "name": "id", - "type": "int", - "meta": "int32" - }, - { - "name": "position", - "type": "Vector2" - }, - { - "name": "weight_scale", - "type": "float", - "meta": "float", - "default_value": "1.0" - } - ] - }, - { - "name": "get_point_position", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135374120, - "return_value": { - "type": "Vector2" - }, - "arguments": [ - { - "name": "id", - "type": "int", - "meta": "int32" - } - ] - }, - { - "name": "set_point_position", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 134224103, - "arguments": [ - { - "name": "id", - "type": "int", - "meta": "int32" - }, - { - "name": "position", - "type": "Vector2" - } - ] - }, - { - "name": "get_point_weight_scale", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135374120, - "return_value": { - "type": "float", - "meta": "float" - }, - "arguments": [ - { - "name": "id", - "type": "int", - "meta": "int32" - } - ] - }, - { - "name": "set_point_weight_scale", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 134224103, - "arguments": [ - { - "name": "id", - "type": "int", - "meta": "int32" - }, - { - "name": "weight_scale", - "type": "float", - "meta": "float" - } - ] - }, - { - "name": "remove_point", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 134188166, - "arguments": [ - { - "name": "id", - "type": "int", - "meta": "int32" - } - ] - }, - { - "name": "has_point", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135374120, - "return_value": { - "type": "bool" - }, - "arguments": [ - { - "name": "id", - "type": "int", - "meta": "int32" - } - ] - }, - { - "name": "get_point_connections", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135374087, - "return_value": { - "type": "PackedInt32Array" - }, - "arguments": [ - { - "name": "id", - "type": "int", - "meta": "int32" - } - ] - }, - { - "name": "get_point_ids", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135338150, - "return_value": { - "type": "Array" - } - }, - { - "name": "set_point_disabled", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 134464040, - "arguments": [ - { - "name": "id", - "type": "int", - "meta": "int32" - }, - { - "name": "disabled", - "type": "bool", - "default_value": "true" - } - ] - }, - { - "name": "is_point_disabled", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135374120, - "return_value": { - "type": "bool" - }, - "arguments": [ - { - "name": "id", - "type": "int", - "meta": "int32" - } - ] - }, - { - "name": "connect_points", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135649961, - "arguments": [ - { - "name": "id", - "type": "int", - "meta": "int32" - }, - { - "name": "to_id", - "type": "int", - "meta": "int32" - }, - { - "name": "bidirectional", - "type": "bool", - "default_value": "true" - } - ] - }, - { - "name": "disconnect_points", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 134224103, - "arguments": [ - { - "name": "id", - "type": "int", - "meta": "int32" - }, - { - "name": "to_id", - "type": "int", - "meta": "int32" - } - ] - }, - { - "name": "are_points_connected", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135410057, - "return_value": { - "type": "bool" - }, - "arguments": [ - { - "name": "id", - "type": "int", - "meta": "int32" - }, - { - "name": "to_id", - "type": "int", - "meta": "int32" - } - ] - }, - { - "name": "get_point_count", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135338183, - "return_value": { - "type": "int", - "meta": "int32" - } - }, - { - "name": "get_point_capacity", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135338183, - "return_value": { - "type": "int", - "meta": "int32" - } - }, - { - "name": "reserve_space", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 134188166, - "arguments": [ - { - "name": "num_nodes", - "type": "int", - "meta": "int32" - } - ] - }, - { - "name": "clear", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 134152229 - }, - { - "name": "get_closest_point", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 173599466, - "return_value": { - "type": "int", - "meta": "int32" - }, - "arguments": [ - { - "name": "to_position", - "type": "Vector2" - }, - { - "name": "include_disabled", - "type": "bool", - "default_value": "false" - } - ] - }, - { - "name": "get_closest_position_in_segment", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135374120, - "return_value": { - "type": "Vector2" - }, - "arguments": [ - { - "name": "to_position", - "type": "Vector2" - } - ] - }, - { - "name": "get_point_path", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135410024, - "return_value": { - "type": "PackedVector2Array" - }, - "arguments": [ - { - "name": "from_id", - "type": "int", - "meta": "int32" - }, - { - "name": "to_id", - "type": "int", - "meta": "int32" - } - ] - }, - { - "name": "get_id_path", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135410024, - "return_value": { - "type": "PackedInt32Array" - }, - "arguments": [ - { - "name": "from_id", - "type": "int", - "meta": "int32" - }, - { - "name": "to_id", - "type": "int", - "meta": "int32" - } - ] - } - ] - }, { "name": "AcceptDialog", "is_refcounted": false, @@ -53418,6 +53434,10 @@ "name": "NOTIFICATION_TRANSFORM_CHANGED", "value": 2000 }, + { + "name": "NOTIFICATION_LOCAL_TRANSFORM_CHANGED", + "value": 35 + }, { "name": "NOTIFICATION_DRAW", "value": 30 @@ -58552,23 +58572,6 @@ } ] }, - { - "name": "class_get_category", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135374120, - "return_value": { - "type": "StringName" - }, - "arguments": [ - { - "name": "class", - "type": "StringName" - } - ] - }, { "name": "is_class_enabled", "is_const": true, @@ -65976,7 +65979,7 @@ "hash": 134188166, "arguments": [ { - "name": "to_position", + "name": "position", "type": "Vector2" } ] @@ -68604,16 +68607,16 @@ "properties": [ { "type": "float", - "name": "radius", - "setter": "set_radius", - "getter": "get_radius", + "name": "height", + "setter": "set_height", + "getter": "get_height", "index": -1 }, { "type": "float", - "name": "height", - "setter": "set_height", - "getter": "get_height", + "name": "radius", + "setter": "set_radius", + "getter": "get_radius", "index": -1 } ] @@ -70285,7 +70288,7 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 136835882, + "hash": 2945481455, "arguments": [ { "name": "menu_root", @@ -70297,12 +70300,24 @@ }, { "name": "callback", - "type": "Callable" + "type": "Callable", + "default_value": "" }, { "name": "tag", "type": "Variant", "default_value": "null" + }, + { + "name": "accelerator", + "type": "enum::Key", + "default_value": "0" + }, + { + "name": "index", + "type": "int", + "meta": "int32", + "default_value": "-1" } ] }, @@ -70312,7 +70327,7 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 136835882, + "hash": 2945481455, "arguments": [ { "name": "menu_root", @@ -70324,12 +70339,241 @@ }, { "name": "callback", - "type": "Callable" + "type": "Callable", + "default_value": "" }, { "name": "tag", "type": "Variant", "default_value": "null" + }, + { + "name": "accelerator", + "type": "enum::Key", + "default_value": "0" + }, + { + "name": "index", + "type": "int", + "meta": "int32", + "default_value": "-1" + } + ] + }, + { + "name": "global_menu_add_icon_item", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2614251472, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "icon", + "type": "Texture2D" + }, + { + "name": "label", + "type": "String" + }, + { + "name": "callback", + "type": "Callable", + "default_value": "" + }, + { + "name": "tag", + "type": "Variant", + "default_value": "null" + }, + { + "name": "accelerator", + "type": "enum::Key", + "default_value": "0" + }, + { + "name": "index", + "type": "int", + "meta": "int32", + "default_value": "-1" + } + ] + }, + { + "name": "global_menu_add_icon_check_item", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2614251472, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "icon", + "type": "Texture2D" + }, + { + "name": "label", + "type": "String" + }, + { + "name": "callback", + "type": "Callable", + "default_value": "" + }, + { + "name": "tag", + "type": "Variant", + "default_value": "null" + }, + { + "name": "accelerator", + "type": "enum::Key", + "default_value": "0" + }, + { + "name": "index", + "type": "int", + "meta": "int32", + "default_value": "-1" + } + ] + }, + { + "name": "global_menu_add_radio_check_item", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2945481455, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "label", + "type": "String" + }, + { + "name": "callback", + "type": "Callable", + "default_value": "" + }, + { + "name": "tag", + "type": "Variant", + "default_value": "null" + }, + { + "name": "accelerator", + "type": "enum::Key", + "default_value": "0" + }, + { + "name": "index", + "type": "int", + "meta": "int32", + "default_value": "-1" + } + ] + }, + { + "name": "global_menu_add_icon_radio_check_item", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2614251472, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "icon", + "type": "Texture2D" + }, + { + "name": "label", + "type": "String" + }, + { + "name": "callback", + "type": "Callable", + "default_value": "" + }, + { + "name": "tag", + "type": "Variant", + "default_value": "null" + }, + { + "name": "accelerator", + "type": "enum::Key", + "default_value": "0" + }, + { + "name": "index", + "type": "int", + "meta": "int32", + "default_value": "-1" + } + ] + }, + { + "name": "global_menu_add_multistate_item", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 2283021489, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "labe", + "type": "String" + }, + { + "name": "max_states", + "type": "int", + "meta": "int32" + }, + { + "name": "default_state", + "type": "int", + "meta": "int32" + }, + { + "name": "callback", + "type": "Callable", + "default_value": "" + }, + { + "name": "tag", + "type": "Variant", + "default_value": "null" + }, + { + "name": "accelerator", + "type": "enum::Key", + "default_value": "0" + }, + { + "name": "index", + "type": "int", + "meta": "int32", + "default_value": "-1" } ] }, @@ -70339,7 +70583,7 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 134260040, + "hash": 136835882, "arguments": [ { "name": "menu_root", @@ -70352,6 +70596,12 @@ { "name": "submenu", "type": "String" + }, + { + "name": "index", + "type": "int", + "meta": "int32", + "default_value": "-1" } ] }, @@ -70361,11 +70611,61 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 134188166, + "hash": 134464040, "arguments": [ { "name": "menu_root", "type": "String" + }, + { + "name": "index", + "type": "int", + "meta": "int32", + "default_value": "-1" + } + ] + }, + { + "name": "global_menu_get_item_index_from_text", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135410057, + "return_value": { + "type": "int", + "meta": "int32" + }, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "text", + "type": "String" + } + ] + }, + { + "name": "global_menu_get_item_index_from_tag", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135410057, + "return_value": { + "type": "int", + "meta": "int32" + }, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "tag", + "type": "Variant" } ] }, @@ -70414,12 +70714,34 @@ ] }, { - "name": "global_menu_get_item_callback", - "is_const": false, + "name": "global_menu_is_item_radio_checkable", + "is_const": true, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 135410024, + "hash": 135410057, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "idx", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "global_menu_get_item_callback", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135410057, "return_value": { "type": "Callable" }, @@ -70437,11 +70759,11 @@ }, { "name": "global_menu_get_item_tag", - "is_const": false, + "is_const": true, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 135410024, + "hash": 135410057, "return_value": { "type": "Variant" }, @@ -70459,11 +70781,11 @@ }, { "name": "global_menu_get_item_text", - "is_const": false, + "is_const": true, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 135410024, + "hash": 135410057, "return_value": { "type": "String" }, @@ -70481,11 +70803,11 @@ }, { "name": "global_menu_get_item_submenu", - "is_const": false, + "is_const": true, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 135410024, + "hash": 135410057, "return_value": { "type": "String" }, @@ -70501,6 +70823,140 @@ } ] }, + { + "name": "global_menu_get_item_accelerator", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135410057, + "return_value": { + "type": "enum::Key" + }, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "idx", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "global_menu_is_item_disabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135410057, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "idx", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "global_menu_get_item_tooltip", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135410057, + "return_value": { + "type": "String" + }, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "idx", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "global_menu_get_item_state", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135410057, + "return_value": { + "type": "int", + "meta": "int32" + }, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "idx", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "global_menu_get_item_max_states", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135410057, + "return_value": { + "type": "int", + "meta": "int32" + }, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "idx", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "global_menu_get_item_icon", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135410057, + "return_value": { + "type": "Texture2D" + }, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "idx", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "global_menu_set_item_checked", "is_const": false, @@ -70547,6 +71003,29 @@ } ] }, + { + "name": "global_menu_set_item_radio_checkable", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134260040, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "idx", + "type": "int", + "meta": "int32" + }, + { + "name": "checkable", + "type": "bool" + } + ] + }, { "name": "global_menu_set_item_callback", "is_const": false, @@ -70639,6 +71118,146 @@ } ] }, + { + "name": "global_menu_set_item_accelerator", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134260040, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "idx", + "type": "int", + "meta": "int32" + }, + { + "name": "keycode", + "type": "enum::Key" + } + ] + }, + { + "name": "global_menu_set_item_disabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134260040, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "idx", + "type": "int", + "meta": "int32" + }, + { + "name": "disabled", + "type": "bool" + } + ] + }, + { + "name": "global_menu_set_item_tooltip", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134260040, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "idx", + "type": "int", + "meta": "int32" + }, + { + "name": "tooltip", + "type": "String" + } + ] + }, + { + "name": "global_menu_set_item_state", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134260040, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "idx", + "type": "int", + "meta": "int32" + }, + { + "name": "state", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "global_menu_set_item_max_states", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134260040, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "idx", + "type": "int", + "meta": "int32" + }, + { + "name": "max_states", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "global_menu_set_item_icon", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134260040, + "arguments": [ + { + "name": "menu_root", + "type": "String" + }, + { + "name": "idx", + "type": "int", + "meta": "int32" + }, + { + "name": "icon", + "type": "Texture2D" + } + ] + }, { "name": "global_menu_remove_item", "is_const": false, @@ -70698,7 +71317,7 @@ } }, { - "name": "mouse_warp_to_position", + "name": "warp_mouse", "is_const": false, "is_vararg": false, "is_static": false, @@ -78663,6 +79282,13 @@ } ] }, + { + "name": "EditorSceneFormatImporterBlend", + "is_refcounted": true, + "is_instantiable": false, + "inherits": "EditorSceneFormatImporter", + "api_type": "editor" + }, { "name": "EditorSceneFormatImporterFBX", "is_refcounted": true, @@ -80203,6 +80829,50 @@ "type": "PackedStringArray" } }, + { + "name": "register_script_language", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "language", + "type": "ScriptLanguage" + } + ] + }, + { + "name": "get_script_language_count", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338150, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "get_script_language", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135374120, + "return_value": { + "type": "ScriptLanguage" + }, + "arguments": [ + { + "name": "index", + "type": "int", + "meta": "int32" + } + ] + }, { "name": "is_editor_hint", "is_const": true, @@ -83216,35 +83886,35 @@ }, { "type": "bool", - "name": "ss_reflections_enabled", + "name": "ssr_enabled", "setter": "set_ssr_enabled", "getter": "is_ssr_enabled", "index": -1 }, { "type": "int", - "name": "ss_reflections_max_steps", + "name": "ssr_max_steps", "setter": "set_ssr_max_steps", "getter": "get_ssr_max_steps", "index": -1 }, { "type": "float", - "name": "ss_reflections_fade_in", + "name": "ssr_fade_in", "setter": "set_ssr_fade_in", "getter": "get_ssr_fade_in", "index": -1 }, { "type": "float", - "name": "ss_reflections_fade_out", + "name": "ssr_fade_out", "setter": "set_ssr_fade_out", "getter": "get_ssr_fade_out", "index": -1 }, { "type": "float", - "name": "ss_reflections_depth_tolerance", + "name": "ssr_depth_tolerance", "setter": "set_ssr_depth_tolerance", "getter": "get_ssr_depth_tolerance", "index": -1 @@ -83822,6 +84492,919 @@ } ] }, + { + "name": "FastNoiseLite", + "is_refcounted": true, + "is_instantiable": true, + "inherits": "Noise", + "api_type": "core", + "enums": [ + { + "name": "DomainWarpType", + "values": [ + { + "name": "DOMAIN_WARP_SIMPLEX", + "value": 0 + }, + { + "name": "DOMAIN_WARP_SIMPLEX_REDUCED", + "value": 1 + }, + { + "name": "DOMAIN_WARP_BASIC_GRID", + "value": 2 + } + ] + }, + { + "name": "CellularDistanceFunction", + "values": [ + { + "name": "DISTANCE_EUCLIDEAN", + "value": 0 + }, + { + "name": "DISTANCE_EUCLIDEAN_SQUARED", + "value": 1 + }, + { + "name": "DISTANCE_MANHATTAN", + "value": 2 + }, + { + "name": "DISTANCE_HYBRID", + "value": 3 + } + ] + }, + { + "name": "CellularReturnType", + "values": [ + { + "name": "RETURN_CELL_VALUE", + "value": 0 + }, + { + "name": "RETURN_DISTANCE", + "value": 1 + }, + { + "name": "RETURN_DISTANCE2", + "value": 2 + }, + { + "name": "RETURN_DISTANCE2_ADD", + "value": 3 + }, + { + "name": "RETURN_DISTANCE2_SUB", + "value": 4 + }, + { + "name": "RETURN_DISTANCE2_MUL", + "value": 5 + }, + { + "name": "RETURN_DISTANCE2_DIV", + "value": 6 + } + ] + }, + { + "name": "FractalType", + "values": [ + { + "name": "FRACTAL_NONE", + "value": 0 + }, + { + "name": "FRACTAL_FBM", + "value": 1 + }, + { + "name": "FRACTAL_RIDGED", + "value": 2 + }, + { + "name": "FRACTAL_PING_PONG", + "value": 3 + } + ] + }, + { + "name": "NoiseType", + "values": [ + { + "name": "TYPE_VALUE", + "value": 5 + }, + { + "name": "TYPE_VALUE_CUBIC", + "value": 4 + }, + { + "name": "TYPE_PERLIN", + "value": 3 + }, + { + "name": "TYPE_CELLULAR", + "value": 2 + }, + { + "name": "TYPE_SIMPLEX", + "value": 0 + }, + { + "name": "TYPE_SIMPLEX_SMOOTH", + "value": 1 + } + ] + }, + { + "name": "DomainWarpFractalType", + "values": [ + { + "name": "DOMAIN_WARP_FRACTAL_NONE", + "value": 0 + }, + { + "name": "DOMAIN_WARP_FRACTAL_PROGRESSIVE", + "value": 1 + }, + { + "name": "DOMAIN_WARP_FRACTAL_INDEPENDENT", + "value": 2 + } + ] + } + ], + "methods": [ + { + "name": "set_noise_type", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "type", + "type": "enum::FastNoiseLite.NoiseType" + } + ] + }, + { + "name": "get_noise_type", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "enum::FastNoiseLite.NoiseType" + } + }, + { + "name": "set_seed", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "seed", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_seed", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "set_frequency", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "freq", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_frequency", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_in_3d_space", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "enable", + "type": "bool" + } + ] + }, + { + "name": "is_in_3d_space", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_offset", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "offset", + "type": "Vector3" + } + ] + }, + { + "name": "get_offset", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "Vector3" + } + }, + { + "name": "set_color_ramp", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "gradient", + "type": "Gradient" + } + ] + }, + { + "name": "get_color_ramp", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "Gradient" + } + }, + { + "name": "set_fractal_type", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "type", + "type": "enum::FastNoiseLite.FractalType" + } + ] + }, + { + "name": "get_fractal_type", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "enum::FastNoiseLite.FractalType" + } + }, + { + "name": "set_fractal_octaves", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "octave_count", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_fractal_octaves", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "set_fractal_lacunarity", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "lacunarity", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_fractal_lacunarity", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_fractal_gain", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "gain", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_fractal_gain", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_fractal_weighted_strength", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "weighted_strength", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_fractal_weighted_strength", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_fractal_ping_pong_strength", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "ping_pong_strength", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_fractal_ping_pong_strength", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_cellular_distance_function", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "func", + "type": "enum::FastNoiseLite.CellularDistanceFunction" + } + ] + }, + { + "name": "get_cellular_distance_function", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "enum::FastNoiseLite.CellularDistanceFunction" + } + }, + { + "name": "set_cellular_jitter", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "jitter", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_cellular_jitter", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_cellular_return_type", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "ret", + "type": "enum::FastNoiseLite.CellularReturnType" + } + ] + }, + { + "name": "get_cellular_return_type", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "enum::FastNoiseLite.CellularReturnType" + } + }, + { + "name": "set_domain_warp_enabled", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "domain_warp_enabled", + "type": "bool" + } + ] + }, + { + "name": "is_domain_warp_enabled", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_domain_warp_type", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "domain_warp_type", + "type": "enum::FastNoiseLite.DomainWarpType" + } + ] + }, + { + "name": "get_domain_warp_type", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "enum::FastNoiseLite.DomainWarpType" + } + }, + { + "name": "set_domain_warp_amplitude", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "domain_warp_amplitude", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_domain_warp_amplitude", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_domain_warp_frequency", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "domain_warp_frequency", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_domain_warp_frequency", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_domain_warp_fractal_type", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "domain_warp_fractal_type", + "type": "enum::FastNoiseLite.DomainWarpFractalType" + } + ] + }, + { + "name": "get_domain_warp_fractal_type", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "enum::FastNoiseLite.DomainWarpFractalType" + } + }, + { + "name": "set_domain_warp_fractal_octaves", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "domain_warp_octave_count", + "type": "int", + "meta": "int32" + } + ] + }, + { + "name": "get_domain_warp_fractal_octaves", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "int", + "meta": "int32" + } + }, + { + "name": "set_domain_warp_fractal_lacunarity", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "domain_warp_lacunarity", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_domain_warp_fractal_lacunarity", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "float", + "meta": "float" + } + }, + { + "name": "set_domain_warp_fractal_gain", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "domain_warp_gain", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_domain_warp_fractal_gain", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "float", + "meta": "float" + } + } + ], + "properties": [ + { + "type": "int", + "name": "noise_type", + "setter": "set_noise_type", + "getter": "get_noise_type", + "index": -1 + }, + { + "type": "int", + "name": "seed", + "setter": "set_seed", + "getter": "get_seed", + "index": -1 + }, + { + "type": "float", + "name": "frequency", + "setter": "set_frequency", + "getter": "get_frequency", + "index": -1 + }, + { + "type": "bool", + "name": "in_3d_space", + "setter": "set_in_3d_space", + "getter": "is_in_3d_space", + "index": -1 + }, + { + "type": "Vector3", + "name": "offset", + "setter": "set_offset", + "getter": "get_offset", + "index": -1 + }, + { + "type": "Gradient", + "name": "color_ramp", + "setter": "set_color_ramp", + "getter": "get_color_ramp", + "index": -1 + }, + { + "type": "int", + "name": "fractal_type", + "setter": "set_fractal_type", + "getter": "get_fractal_type", + "index": -1 + }, + { + "type": "int", + "name": "fractal_octaves", + "setter": "set_fractal_octaves", + "getter": "get_fractal_octaves", + "index": -1 + }, + { + "type": "float", + "name": "fractal_lacunarity", + "setter": "set_fractal_lacunarity", + "getter": "get_fractal_lacunarity", + "index": -1 + }, + { + "type": "float", + "name": "fractal_gain", + "setter": "set_fractal_gain", + "getter": "get_fractal_gain", + "index": -1 + }, + { + "type": "float", + "name": "fractal_weighted_strength", + "setter": "set_fractal_weighted_strength", + "getter": "get_fractal_weighted_strength", + "index": -1 + }, + { + "type": "float", + "name": "fractal_ping_pong_strength", + "setter": "set_fractal_ping_pong_strength", + "getter": "get_fractal_ping_pong_strength", + "index": -1 + }, + { + "type": "int", + "name": "cellular_distance_function", + "setter": "set_cellular_distance_function", + "getter": "get_cellular_distance_function", + "index": -1 + }, + { + "type": "float", + "name": "cellular_jitter", + "setter": "set_cellular_jitter", + "getter": "get_cellular_jitter", + "index": -1 + }, + { + "type": "int", + "name": "cellular_return_type", + "setter": "set_cellular_return_type", + "getter": "get_cellular_return_type", + "index": -1 + }, + { + "type": "bool", + "name": "domain_warp_enabled", + "setter": "set_domain_warp_enabled", + "getter": "is_domain_warp_enabled", + "index": -1 + }, + { + "type": "int", + "name": "domain_warp_type", + "setter": "set_domain_warp_type", + "getter": "get_domain_warp_type", + "index": -1 + }, + { + "type": "float", + "name": "domain_warp_amplitude", + "setter": "set_domain_warp_amplitude", + "getter": "get_domain_warp_amplitude", + "index": -1 + }, + { + "type": "float", + "name": "domain_warp_frequency", + "setter": "set_domain_warp_frequency", + "getter": "get_domain_warp_frequency", + "index": -1 + }, + { + "type": "int", + "name": "domain_warp_fractal_type", + "setter": "set_domain_warp_fractal_type", + "getter": "get_domain_warp_fractal_type", + "index": -1 + }, + { + "type": "int", + "name": "domain_warp_fractal_octaves", + "setter": "set_domain_warp_fractal_octaves", + "getter": "get_domain_warp_fractal_octaves", + "index": -1 + }, + { + "type": "float", + "name": "domain_warp_fractal_lacunarity", + "setter": "set_domain_warp_fractal_lacunarity", + "getter": "get_domain_warp_fractal_lacunarity", + "index": -1 + }, + { + "type": "float", + "name": "domain_warp_fractal_gain", + "setter": "set_domain_warp_fractal_gain", + "getter": "get_domain_warp_fractal_gain", + "index": -1 + } + ] + }, { "name": "File", "is_refcounted": true, @@ -88900,7 +90483,7 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 1513270700, + "hash": 2146812409, "return_value": { "type": "enum::Error" }, @@ -88924,6 +90507,11 @@ "type": "int", "meta": "int32", "default_value": "30" + }, + { + "name": "base_path", + "type": "String", + "default_value": "\"\"" } ] }, @@ -101134,8 +102722,8 @@ "arguments": [ { "name": "timeout", - "type": "int", - "meta": "int32" + "type": "float", + "meta": "double" } ] }, @@ -101147,8 +102735,8 @@ "is_virtual": false, "hash": 135338150, "return_value": { - "type": "int", - "meta": "int32" + "type": "float", + "meta": "double" } }, { @@ -101284,7 +102872,7 @@ "index": -1 }, { - "type": "int", + "type": "float", "name": "timeout", "setter": "set_timeout", "getter": "get_timeout", @@ -101698,7 +103286,7 @@ "constants": [ { "name": "RESOLVER_MAX_QUERIES", - "value": 32 + "value": 256 }, { "name": "RESOLVER_INVALID_ID", @@ -102587,11 +104175,11 @@ }, { "name": "detect_used_channels", - "is_const": false, + "is_const": true, "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 2590297011, + "hash": 2590297044, "return_value": { "type": "enum::Image.UsedChannels" }, @@ -104683,7 +106271,7 @@ } }, { - "name": "warp_mouse_position", + "name": "warp_mouse", "is_const": false, "is_vararg": false, "is_static": false, @@ -104691,7 +106279,7 @@ "hash": 134188166, "arguments": [ { - "name": "to", + "name": "position", "type": "Vector2" } ] @@ -124887,10 +126475,7 @@ "is_vararg": true, "is_static": false, "is_virtual": false, - "hash": 135374088, - "return_value": { - "type": "Variant" - }, + "hash": 134188167, "arguments": [ { "name": "method", @@ -124904,10 +126489,7 @@ "is_vararg": true, "is_static": false, "is_virtual": false, - "hash": 135410025, - "return_value": { - "type": "Variant" - }, + "hash": 134224104, "arguments": [ { "name": "peer_id", @@ -126572,6 +128154,185 @@ "inherits": "RefCounted", "api_type": "core" }, + { + "name": "Noise", + "is_refcounted": true, + "is_instantiable": false, + "inherits": "Resource", + "api_type": "core", + "methods": [ + { + "name": "get_noise_1d", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135374087, + "return_value": { + "type": "float", + "meta": "float" + }, + "arguments": [ + { + "name": "x", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_noise_2d", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135410024, + "return_value": { + "type": "float", + "meta": "float" + }, + "arguments": [ + { + "name": "x", + "type": "float", + "meta": "float" + }, + { + "name": "y", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_noise_2dv", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135374087, + "return_value": { + "type": "float", + "meta": "float" + }, + "arguments": [ + { + "name": "v", + "type": "Vector2" + } + ] + }, + { + "name": "get_noise_3d", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135445961, + "return_value": { + "type": "float", + "meta": "float" + }, + "arguments": [ + { + "name": "x", + "type": "float", + "meta": "float" + }, + { + "name": "y", + "type": "float", + "meta": "float" + }, + { + "name": "z", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_noise_3dv", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135374087, + "return_value": { + "type": "float", + "meta": "float" + }, + "arguments": [ + { + "name": "v", + "type": "Vector3" + } + ] + }, + { + "name": "get_image", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 174785354, + "return_value": { + "type": "Image" + }, + "arguments": [ + { + "name": "width", + "type": "int", + "meta": "int32" + }, + { + "name": "height", + "type": "int", + "meta": "int32" + }, + { + "name": "invert", + "type": "bool", + "default_value": "false" + } + ] + }, + { + "name": "get_seamless_image", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 1513270700, + "return_value": { + "type": "Image" + }, + "arguments": [ + { + "name": "width", + "type": "int", + "meta": "int32" + }, + { + "name": "height", + "type": "int", + "meta": "int32" + }, + { + "name": "invert", + "type": "bool", + "default_value": "false" + }, + { + "name": "skirt", + "type": "float", + "meta": "float", + "default_value": "0.1" + } + ] + } + ] + }, { "name": "NoiseTexture", "is_refcounted": true, @@ -126619,7 +128380,7 @@ "arguments": [ { "name": "noise", - "type": "OpenSimplexNoise" + "type": "Noise" } ] }, @@ -126631,11 +128392,11 @@ "is_virtual": false, "hash": 135338150, "return_value": { - "type": "OpenSimplexNoise" + "type": "Noise" } }, { - "name": "set_noise_offset", + "name": "set_invert", "is_const": false, "is_vararg": false, "is_static": false, @@ -126643,20 +128404,20 @@ "hash": 134188166, "arguments": [ { - "name": "noise_offset", - "type": "Vector2" + "name": "invert", + "type": "bool" } ] }, { - "name": "get_noise_offset", + "name": "get_invert", "is_const": true, "is_vararg": false, "is_static": false, "is_virtual": false, "hash": 135338183, "return_value": { - "type": "Vector2" + "type": "bool" } }, { @@ -126684,6 +128445,33 @@ "type": "bool" } }, + { + "name": "set_seamless_blend_skirt", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "seamless_blend_skirt", + "type": "float", + "meta": "float" + } + ] + }, + { + "name": "get_seamless_blend_skirt", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338150, + "return_value": { + "type": "float", + "meta": "float" + } + }, { "name": "set_as_normal_map", "is_const": false, @@ -126752,6 +128540,13 @@ "getter": "get_height", "index": -1 }, + { + "type": "bool", + "name": "invert", + "setter": "set_invert", + "getter": "get_invert", + "index": -1 + }, { "type": "bool", "name": "seamless", @@ -126759,6 +128554,13 @@ "getter": "get_seamless", "index": -1 }, + { + "type": "float", + "name": "seamless_blend_skirt", + "setter": "set_seamless_blend_skirt", + "getter": "get_seamless_blend_skirt", + "index": -1 + }, { "type": "bool", "name": "as_normal_map", @@ -126774,18 +128576,11 @@ "index": -1 }, { - "type": "OpenSimplexNoise", + "type": "Noise", "name": "noise", "setter": "set_noise", "getter": "get_noise", "index": -1 - }, - { - "type": "Vector2", - "name": "noise_offset", - "setter": "set_noise_offset", - "getter": "get_noise_offset", - "index": -1 } ] }, @@ -128154,7 +129949,7 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 135374120, + "hash": 173599466, "return_value": { "type": "Variant" }, @@ -128162,6 +129957,11 @@ { "name": "name", "type": "StringName" + }, + { + "name": "default", + "type": "Variant", + "default_value": "null" } ] }, @@ -128237,7 +130037,7 @@ "is_virtual": false, "hash": 135374088, "return_value": { - "type": "void" + "type": "enum::Error" }, "arguments": [ { @@ -128271,7 +130071,7 @@ "is_virtual": false, "hash": 135374088, "return_value": { - "type": "void" + "type": "Variant" }, "arguments": [ { @@ -128972,375 +130772,6 @@ } ] }, - { - "name": "OpenSimplexNoise", - "is_refcounted": true, - "is_instantiable": true, - "inherits": "Resource", - "api_type": "core", - "methods": [ - { - "name": "get_seed", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135338183, - "return_value": { - "type": "int", - "meta": "int32" - } - }, - { - "name": "set_seed", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 134188166, - "arguments": [ - { - "name": "seed", - "type": "int", - "meta": "int32" - } - ] - }, - { - "name": "set_octaves", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 134188166, - "arguments": [ - { - "name": "octave_count", - "type": "int", - "meta": "int32" - } - ] - }, - { - "name": "get_octaves", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135338183, - "return_value": { - "type": "int", - "meta": "int32" - } - }, - { - "name": "set_period", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 134188166, - "arguments": [ - { - "name": "period", - "type": "float", - "meta": "float" - } - ] - }, - { - "name": "get_period", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135338183, - "return_value": { - "type": "float", - "meta": "float" - } - }, - { - "name": "set_persistence", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 134188166, - "arguments": [ - { - "name": "persistence", - "type": "float", - "meta": "float" - } - ] - }, - { - "name": "get_persistence", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135338183, - "return_value": { - "type": "float", - "meta": "float" - } - }, - { - "name": "set_lacunarity", - "is_const": false, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 134188166, - "arguments": [ - { - "name": "lacunarity", - "type": "float", - "meta": "float" - } - ] - }, - { - "name": "get_lacunarity", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135338183, - "return_value": { - "type": "float", - "meta": "float" - } - }, - { - "name": "get_image", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 174785387, - "return_value": { - "type": "Image" - }, - "arguments": [ - { - "name": "width", - "type": "int", - "meta": "int32" - }, - { - "name": "height", - "type": "int", - "meta": "int32" - }, - { - "name": "noise_offset", - "type": "Vector2", - "default_value": "Vector2(0, 0)" - } - ] - }, - { - "name": "get_seamless_image", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135374120, - "return_value": { - "type": "Image" - }, - "arguments": [ - { - "name": "size", - "type": "int", - "meta": "int32" - } - ] - }, - { - "name": "get_noise_1d", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135374120, - "return_value": { - "type": "float", - "meta": "float" - }, - "arguments": [ - { - "name": "x", - "type": "float", - "meta": "float" - } - ] - }, - { - "name": "get_noise_2d", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135410057, - "return_value": { - "type": "float", - "meta": "float" - }, - "arguments": [ - { - "name": "x", - "type": "float", - "meta": "float" - }, - { - "name": "y", - "type": "float", - "meta": "float" - } - ] - }, - { - "name": "get_noise_3d", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135445994, - "return_value": { - "type": "float", - "meta": "float" - }, - "arguments": [ - { - "name": "x", - "type": "float", - "meta": "float" - }, - { - "name": "y", - "type": "float", - "meta": "float" - }, - { - "name": "z", - "type": "float", - "meta": "float" - } - ] - }, - { - "name": "get_noise_4d", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135481931, - "return_value": { - "type": "float", - "meta": "float" - }, - "arguments": [ - { - "name": "x", - "type": "float", - "meta": "float" - }, - { - "name": "y", - "type": "float", - "meta": "float" - }, - { - "name": "z", - "type": "float", - "meta": "float" - }, - { - "name": "w", - "type": "float", - "meta": "float" - } - ] - }, - { - "name": "get_noise_2dv", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135374120, - "return_value": { - "type": "float", - "meta": "float" - }, - "arguments": [ - { - "name": "pos", - "type": "Vector2" - } - ] - }, - { - "name": "get_noise_3dv", - "is_const": true, - "is_vararg": false, - "is_static": false, - "is_virtual": false, - "hash": 135374120, - "return_value": { - "type": "float", - "meta": "float" - }, - "arguments": [ - { - "name": "pos", - "type": "Vector3" - } - ] - } - ], - "properties": [ - { - "type": "int", - "name": "seed", - "setter": "set_seed", - "getter": "get_seed", - "index": -1 - }, - { - "type": "int", - "name": "octaves", - "setter": "set_octaves", - "getter": "get_octaves", - "index": -1 - }, - { - "type": "float", - "name": "period", - "setter": "set_period", - "getter": "get_period", - "index": -1 - }, - { - "type": "float", - "name": "persistence", - "setter": "set_persistence", - "getter": "get_persistence", - "index": -1 - }, - { - "type": "float", - "name": "lacunarity", - "setter": "set_lacunarity", - "getter": "get_lacunarity", - "index": -1 - } - ] - }, { "name": "OptimizedTranslation", "is_refcounted": true, @@ -150543,6 +151974,188 @@ "inherits": "Popup", "api_type": "core" }, + { + "name": "PortableCompressedTexture2D", + "is_refcounted": true, + "is_instantiable": true, + "inherits": "Texture2D", + "api_type": "core", + "enums": [ + { + "name": "CompressionMode", + "values": [ + { + "name": "COMPRESSION_MODE_LOSSLESS", + "value": 0 + }, + { + "name": "COMPRESSION_MODE_LOSSY", + "value": 1 + }, + { + "name": "COMPRESSION_MODE_BASIS_UNIVERSAL", + "value": 2 + }, + { + "name": "COMPRESSION_MODE_S3TC", + "value": 3 + }, + { + "name": "COMPRESSION_MODE_ETC2", + "value": 4 + }, + { + "name": "COMPRESSION_MODE_BPTC", + "value": 5 + } + ] + } + ], + "methods": [ + { + "name": "create_from_image", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 221802731, + "arguments": [ + { + "name": "image", + "type": "Image" + }, + { + "name": "compression_mode", + "type": "enum::PortableCompressedTexture2D.CompressionMode" + }, + { + "name": "normal_map", + "type": "bool", + "default_value": "false" + }, + { + "name": "lossy_quality", + "type": "float", + "meta": "float", + "default_value": "0.8" + } + ] + }, + { + "name": "get_format", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "enum::Image.Format" + } + }, + { + "name": "get_compression_mode", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "enum::PortableCompressedTexture2D.CompressionMode" + } + }, + { + "name": "set_size_override", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "size", + "type": "Vector2" + } + ] + }, + { + "name": "get_size_override", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "Vector2" + } + }, + { + "name": "set_keep_compressed_buffer", + "is_const": false, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "keep", + "type": "bool" + } + ] + }, + { + "name": "is_keeping_compressed_buffer", + "is_const": true, + "is_vararg": false, + "is_static": false, + "is_virtual": false, + "hash": 135338183, + "return_value": { + "type": "bool" + } + }, + { + "name": "set_keep_all_compressed_buffers", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 134188166, + "arguments": [ + { + "name": "keep", + "type": "bool" + } + ] + }, + { + "name": "is_keeping_all_compressed_buffers", + "is_const": false, + "is_vararg": false, + "is_static": true, + "is_virtual": false, + "hash": 135338150, + "return_value": { + "type": "bool" + } + } + ], + "properties": [ + { + "type": "Vector2", + "name": "size_override", + "setter": "set_size_override", + "getter": "get_size_override", + "index": -1 + }, + { + "type": "bool", + "name": "keep_compressed_buffer", + "setter": "set_keep_compressed_buffer", + "getter": "is_keeping_compressed_buffer", + "index": -1 + } + ] + }, { "name": "Position2D", "is_refcounted": false, @@ -155855,7 +157468,7 @@ "is_virtual": true, "arguments": [ { - "name": "", + "name": "new_value", "type": "float" } ] @@ -179356,10 +180969,7 @@ "is_vararg": true, "is_static": false, "is_virtual": false, - "hash": 135445962, - "return_value": { - "type": "Variant" - }, + "hash": 134260041, "arguments": [ { "name": "flags", @@ -179432,10 +181042,7 @@ "is_vararg": true, "is_static": false, "is_virtual": false, - "hash": 135410025, - "return_value": { - "type": "Variant" - }, + "hash": 134224104, "arguments": [ { "name": "group", @@ -180289,6 +181896,1334 @@ } ] }, + { + "name": "ScriptExtension", + "is_refcounted": true, + "is_instantiable": true, + "inherits": "Script", + "api_type": "core", + "methods": [ + { + "name": "_editor_can_reload_from_file", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + } + }, + { + "name": "_placeholder_erased", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "arguments": [ + { + "name": "placeholder", + "type": "void*" + } + ] + }, + { + "name": "_can_instantiate", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + } + }, + { + "name": "_get_base_script", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Script" + } + }, + { + "name": "_inherits_script", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "script", + "type": "Script" + } + ] + }, + { + "name": "_get_instance_base_type", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "StringName" + } + }, + { + "name": "_instance_create", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "void*" + }, + "arguments": [ + { + "name": "for_object", + "type": "Object" + } + ] + }, + { + "name": "_placeholder_instance_create", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "void*" + }, + "arguments": [ + { + "name": "for_object", + "type": "Object" + } + ] + }, + { + "name": "_instance_has", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "object", + "type": "Object" + } + ] + }, + { + "name": "_has_source_code", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + } + }, + { + "name": "_get_source_code", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "String" + } + }, + { + "name": "_set_source_code", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "arguments": [ + { + "name": "code", + "type": "String" + } + ] + }, + { + "name": "_reload", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "enum::Error" + }, + "arguments": [ + { + "name": "keep_state", + "type": "bool" + } + ] + }, + { + "name": "_get_documentation", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Array" + } + }, + { + "name": "_has_method", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "method", + "type": "StringName" + } + ] + }, + { + "name": "_get_method_info", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Dictionary" + }, + "arguments": [ + { + "name": "method", + "type": "StringName" + } + ] + }, + { + "name": "_is_tool", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + } + }, + { + "name": "_is_valid", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + } + }, + { + "name": "_get_language", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "ScriptLanguage" + } + }, + { + "name": "_has_script_signal", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "signal", + "type": "StringName" + } + ] + }, + { + "name": "_get_script_signal_list", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Array" + } + }, + { + "name": "_get_property_default_value", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Variant" + }, + "arguments": [ + { + "name": "property", + "type": "StringName" + } + ] + }, + { + "name": "_update_exports", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true + }, + { + "name": "_get_script_method_list", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Array" + } + }, + { + "name": "_get_script_property_list", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Array" + } + }, + { + "name": "_get_member_line", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "int" + }, + "arguments": [ + { + "name": "member", + "type": "StringName" + } + ] + }, + { + "name": "_get_constants", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Dictionary" + } + }, + { + "name": "_get_members", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Array" + } + }, + { + "name": "_is_placeholder_fallback_enabled", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + } + }, + { + "name": "_get_rpc_methods", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Array" + } + } + ] + }, + { + "name": "ScriptLanguage", + "is_refcounted": false, + "is_instantiable": false, + "inherits": "Object", + "api_type": "core" + }, + { + "name": "ScriptLanguageExtension", + "is_refcounted": false, + "is_instantiable": true, + "inherits": "ScriptLanguage", + "api_type": "core", + "enums": [ + { + "name": "CodeCompletionKind", + "values": [ + { + "name": "CODE_COMPLETION_KIND_CLASS", + "value": 0 + }, + { + "name": "CODE_COMPLETION_KIND_FUNCTION", + "value": 1 + }, + { + "name": "CODE_COMPLETION_KIND_SIGNAL", + "value": 2 + }, + { + "name": "CODE_COMPLETION_KIND_VARIABLE", + "value": 3 + }, + { + "name": "CODE_COMPLETION_KIND_MEMBER", + "value": 4 + }, + { + "name": "CODE_COMPLETION_KIND_ENUM", + "value": 5 + }, + { + "name": "CODE_COMPLETION_KIND_CONSTANT", + "value": 6 + }, + { + "name": "CODE_COMPLETION_KIND_NODE_PATH", + "value": 7 + }, + { + "name": "CODE_COMPLETION_KIND_FILE_PATH", + "value": 8 + }, + { + "name": "CODE_COMPLETION_KIND_PLAIN_TEXT", + "value": 9 + }, + { + "name": "CODE_COMPLETION_KIND_MAX", + "value": 10 + } + ] + }, + { + "name": "LookupResultType", + "values": [ + { + "name": "LOOKUP_RESULT_SCRIPT_LOCATION", + "value": 0 + }, + { + "name": "LOOKUP_RESULT_CLASS", + "value": 1 + }, + { + "name": "LOOKUP_RESULT_CLASS_CONSTANT", + "value": 2 + }, + { + "name": "LOOKUP_RESULT_CLASS_PROPERTY", + "value": 3 + }, + { + "name": "LOOKUP_RESULT_CLASS_METHOD", + "value": 4 + }, + { + "name": "LOOKUP_RESULT_CLASS_ENUM", + "value": 5 + }, + { + "name": "LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE", + "value": 6 + }, + { + "name": "LOOKUP_RESULT_MAX", + "value": 7 + } + ] + } + ], + "methods": [ + { + "name": "_get_name", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "String" + } + }, + { + "name": "_init", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true + }, + { + "name": "_get_type", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "String" + } + }, + { + "name": "_get_extension", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "String" + } + }, + { + "name": "_execute_file", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "enum::Error" + }, + "arguments": [ + { + "name": "path", + "type": "String" + } + ] + }, + { + "name": "_finish", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true + }, + { + "name": "_get_reserved_words", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "PackedStringArray" + } + }, + { + "name": "_is_control_flow_keyword", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "keyword", + "type": "String" + } + ] + }, + { + "name": "_get_comment_delimiters", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "PackedStringArray" + } + }, + { + "name": "_get_string_delimiters", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "PackedStringArray" + } + }, + { + "name": "_make_template", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Script" + }, + "arguments": [ + { + "name": "template", + "type": "String" + }, + { + "name": "class_name", + "type": "String" + }, + { + "name": "base_class_name", + "type": "String" + } + ] + }, + { + "name": "_get_built_in_templates", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Array" + }, + "arguments": [ + { + "name": "object", + "type": "StringName" + } + ] + }, + { + "name": "_is_using_templates", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + } + }, + { + "name": "_validate", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Dictionary" + }, + "arguments": [ + { + "name": "script", + "type": "String" + }, + { + "name": "path", + "type": "String" + }, + { + "name": "validate_functions", + "type": "bool" + }, + { + "name": "validate_errors", + "type": "bool" + }, + { + "name": "validate_warnings", + "type": "bool" + }, + { + "name": "validate_safe_lines", + "type": "bool" + } + ] + }, + { + "name": "_validate_path", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "String" + }, + "arguments": [ + { + "name": "path", + "type": "String" + } + ] + }, + { + "name": "_create_script", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Object" + } + }, + { + "name": "_has_named_classes", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + } + }, + { + "name": "_supports_builtin_mode", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + } + }, + { + "name": "_supports_documentation", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + } + }, + { + "name": "_can_inherit_from_file", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + } + }, + { + "name": "_find_function", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "int" + }, + "arguments": [ + { + "name": "class_name", + "type": "String" + }, + { + "name": "function_name", + "type": "String" + } + ] + }, + { + "name": "_make_function", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "String" + }, + "arguments": [ + { + "name": "class_name", + "type": "String" + }, + { + "name": "function_name", + "type": "String" + }, + { + "name": "function_args", + "type": "PackedStringArray" + } + ] + }, + { + "name": "_open_in_external_editor", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "enum::Error" + }, + "arguments": [ + { + "name": "script", + "type": "Script" + }, + { + "name": "line", + "type": "int" + }, + { + "name": "column", + "type": "int" + } + ] + }, + { + "name": "_overrides_external_editor", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + } + }, + { + "name": "_complete_code", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Dictionary" + }, + "arguments": [ + { + "name": "code", + "type": "String" + }, + { + "name": "path", + "type": "String" + }, + { + "name": "owner", + "type": "Object" + } + ] + }, + { + "name": "_lookup_code", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Dictionary" + }, + "arguments": [ + { + "name": "code", + "type": "String" + }, + { + "name": "symbol", + "type": "String" + }, + { + "name": "path", + "type": "String" + }, + { + "name": "owner", + "type": "Object" + } + ] + }, + { + "name": "_auto_indent_code", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "String" + }, + "arguments": [ + { + "name": "code", + "type": "String" + }, + { + "name": "from_line", + "type": "int" + }, + { + "name": "to_line", + "type": "int" + } + ] + }, + { + "name": "_add_global_constant", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "arguments": [ + { + "name": "name", + "type": "StringName" + }, + { + "name": "value", + "type": "Variant" + } + ] + }, + { + "name": "_add_named_global_constant", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "arguments": [ + { + "name": "name", + "type": "StringName" + }, + { + "name": "value", + "type": "Variant" + } + ] + }, + { + "name": "_remove_named_global_constant", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "arguments": [ + { + "name": "name", + "type": "StringName" + } + ] + }, + { + "name": "_thread_enter", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true + }, + { + "name": "_thread_exit", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true + }, + { + "name": "_debug_get_error", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "String" + } + }, + { + "name": "_debug_get_stack_level_count", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "int" + } + }, + { + "name": "_debug_get_stack_level_line", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "int" + }, + "arguments": [ + { + "name": "level", + "type": "int" + } + ] + }, + { + "name": "_debug_get_stack_level_function", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "String" + }, + "arguments": [ + { + "name": "level", + "type": "int" + } + ] + }, + { + "name": "_debug_get_stack_level_locals", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Dictionary" + }, + "arguments": [ + { + "name": "level", + "type": "int" + }, + { + "name": "max_subitems", + "type": "int" + }, + { + "name": "max_depth", + "type": "int" + } + ] + }, + { + "name": "_debug_get_stack_level_members", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Dictionary" + }, + "arguments": [ + { + "name": "level", + "type": "int" + }, + { + "name": "max_subitems", + "type": "int" + }, + { + "name": "max_depth", + "type": "int" + } + ] + }, + { + "name": "_debug_get_stack_level_instance", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "void*" + }, + "arguments": [ + { + "name": "level", + "type": "int" + } + ] + }, + { + "name": "_debug_get_globals", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Dictionary" + }, + "arguments": [ + { + "name": "max_subitems", + "type": "int" + }, + { + "name": "max_depth", + "type": "int" + } + ] + }, + { + "name": "_debug_parse_stack_level_expression", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "String" + }, + "arguments": [ + { + "name": "level", + "type": "int" + }, + { + "name": "expression", + "type": "String" + }, + { + "name": "max_subitems", + "type": "int" + }, + { + "name": "max_depth", + "type": "int" + } + ] + }, + { + "name": "_debug_get_current_stack_info", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Array" + } + }, + { + "name": "_reload_all_scripts", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true + }, + { + "name": "_reload_tool_script", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "arguments": [ + { + "name": "script", + "type": "Script" + }, + { + "name": "soft_reload", + "type": "bool" + } + ] + }, + { + "name": "_get_recognized_extensions", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "PackedStringArray" + } + }, + { + "name": "_get_public_functions", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Array" + } + }, + { + "name": "_get_public_constants", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Dictionary" + } + }, + { + "name": "_profiling_start", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true + }, + { + "name": "_profiling_stop", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true + }, + { + "name": "_profiling_get_accumulated_data", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "int" + }, + "arguments": [ + { + "name": "info_array", + "type": "ScriptLanguageExtensionProfilingInfo*" + }, + { + "name": "info_max", + "type": "int" + } + ] + }, + { + "name": "_profiling_get_frame_data", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "int" + }, + "arguments": [ + { + "name": "info_array", + "type": "ScriptLanguageExtensionProfilingInfo*" + }, + { + "name": "info_max", + "type": "int" + } + ] + }, + { + "name": "_alloc_instance_binding_data", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "void*" + }, + "arguments": [ + { + "name": "object", + "type": "Object" + } + ] + }, + { + "name": "_free_instance_binding_data", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "arguments": [ + { + "name": "data", + "type": "void*" + } + ] + }, + { + "name": "_refcount_incremented_instance_binding", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "arguments": [ + { + "name": "object", + "type": "Object" + } + ] + }, + { + "name": "_refcount_decremented_instance_binding", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "object", + "type": "Object" + } + ] + }, + { + "name": "_frame", + "is_const": false, + "is_static": false, + "is_vararg": false, + "is_virtual": true + }, + { + "name": "_handles_global_class_type", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "bool" + }, + "arguments": [ + { + "name": "type", + "type": "String" + } + ] + }, + { + "name": "_get_global_class_name", + "is_const": true, + "is_static": false, + "is_vararg": false, + "is_virtual": true, + "return_value": { + "type": "Dictionary" + }, + "arguments": [ + { + "name": "path", + "type": "String" + } + ] + } + ] + }, { "name": "ScrollBar", "is_refcounted": false, @@ -211147,6 +214082,48 @@ } ], "properties": [ + { + "type": "int", + "name": "fill_mode", + "setter": "set_fill_mode", + "getter": "get_fill_mode", + "index": -1 + }, + { + "type": "bool", + "name": "nine_patch_stretch", + "setter": "set_nine_patch_stretch", + "getter": "get_nine_patch_stretch", + "index": -1 + }, + { + "type": "int", + "name": "stretch_margin_left", + "setter": "set_stretch_margin", + "getter": "get_stretch_margin", + "index": 0 + }, + { + "type": "int", + "name": "stretch_margin_top", + "setter": "set_stretch_margin", + "getter": "get_stretch_margin", + "index": 1 + }, + { + "type": "int", + "name": "stretch_margin_right", + "setter": "set_stretch_margin", + "getter": "get_stretch_margin", + "index": 2 + }, + { + "type": "int", + "name": "stretch_margin_bottom", + "setter": "set_stretch_margin", + "getter": "get_stretch_margin", + "index": 3 + }, { "type": "Texture2D", "name": "texture_under", @@ -211175,13 +214152,6 @@ "getter": "get_texture_progress_offset", "index": -1 }, - { - "type": "int", - "name": "fill_mode", - "setter": "set_fill_mode", - "getter": "get_fill_mode", - "index": -1 - }, { "type": "Color", "name": "tint_under", @@ -211223,41 +214193,6 @@ "setter": "set_radial_center_offset", "getter": "get_radial_center_offset", "index": -1 - }, - { - "type": "bool", - "name": "nine_patch_stretch", - "setter": "set_nine_patch_stretch", - "getter": "get_nine_patch_stretch", - "index": -1 - }, - { - "type": "int", - "name": "stretch_margin_left", - "setter": "set_stretch_margin", - "getter": "get_stretch_margin", - "index": 0 - }, - { - "type": "int", - "name": "stretch_margin_top", - "setter": "set_stretch_margin", - "getter": "get_stretch_margin", - "index": 1 - }, - { - "type": "int", - "name": "stretch_margin_right", - "setter": "set_stretch_margin", - "getter": "get_stretch_margin", - "index": 2 - }, - { - "type": "int", - "name": "stretch_margin_bottom", - "setter": "set_stretch_margin", - "getter": "get_stretch_margin", - "index": 3 } ] }, @@ -221946,10 +224881,7 @@ "is_vararg": true, "is_static": false, "is_virtual": false, - "hash": 135374088, - "return_value": { - "type": "Variant" - }, + "hash": 134188167, "arguments": [ { "name": "method", @@ -223698,10 +226630,7 @@ "is_vararg": true, "is_static": false, "is_virtual": false, - "hash": 135410025, - "return_value": { - "type": "void" - }, + "hash": 134224104, "arguments": [ { "name": "object", @@ -223719,10 +226648,7 @@ "is_vararg": true, "is_static": false, "is_virtual": false, - "hash": 135410025, - "return_value": { - "type": "void" - }, + "hash": 134224104, "arguments": [ { "name": "object", @@ -225946,7 +228872,7 @@ "hash": 134188166, "arguments": [ { - "name": "to_position", + "name": "position", "type": "Vector2" } ] @@ -245615,6 +248541,10 @@ { "name": "PhysicsServer3DExtensionStateCallback", "format": "void *instance;void (*callback)(void *p_instance, PhysicsDirectBodyState3D *p_state)" + }, + { + "name": "ScriptLanguageExtensionProfilingInfo", + "format": "StringName signature;uint64_t call_count;uint64_t total_time;uint64_t self_time" } ] } \ No newline at end of file diff --git a/godot-headers/godot/gdnative_interface.h b/godot-headers/godot/gdnative_interface.h index cc2957ec..732a1b5a 100644 --- a/godot-headers/godot/gdnative_interface.h +++ b/godot-headers/godot/gdnative_interface.h @@ -205,10 +205,21 @@ typedef struct { uint32_t usage; } GDNativePropertyInfo; +typedef struct { + const char *name; + GDNativePropertyInfo return_value; + uint32_t flags; // From GDNativeExtensionClassMethodFlags + int32_t id; + GDNativePropertyInfo *arguments; + uint32_t argument_count; + GDNativeVariantPtr default_arguments; + uint32_t default_argument_count; +} GDNativeMethodInfo; + typedef const GDNativePropertyInfo *(*GDNativeExtensionClassGetPropertyList)(GDExtensionClassInstancePtr p_instance, uint32_t *r_count); typedef void (*GDNativeExtensionClassFreePropertyList)(GDExtensionClassInstancePtr p_instance, const GDNativePropertyInfo *p_list); typedef void (*GDNativeExtensionClassNotification)(GDExtensionClassInstancePtr p_instance, int32_t p_what); -typedef const char *(*GDNativeExtensionClassToString)(GDExtensionClassInstancePtr p_instance); +typedef void (*GDNativeExtensionClassToString)(GDExtensionClassInstancePtr p_instance, GDNativeStringPtr p_out); typedef void (*GDNativeExtensionClassReference)(GDExtensionClassInstancePtr p_instance); typedef void (*GDNativeExtensionClassUnreference)(GDExtensionClassInstancePtr p_instance); typedef void (*GDNativeExtensionClassCallVirtual)(GDExtensionClassInstancePtr p_instance, const GDNativeTypePtr *p_args, GDNativeTypePtr r_ret); @@ -289,6 +300,79 @@ typedef struct { GDNativeVariantPtr *default_arguments; } GDNativeExtensionClassMethodInfo; +/* SCRIPT INSTANCE EXTENSION */ + +typedef void *GDNativeExtensionScriptInstanceDataPtr; // Pointer to custom ScriptInstance native implementation + +typedef GDNativeBool (*GDNativeExtensionScriptInstanceSet)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativeStringNamePtr p_name, const GDNativeVariantPtr p_value); +typedef GDNativeBool (*GDNativeExtensionScriptInstanceGet)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativeStringNamePtr p_name, GDNativeVariantPtr r_ret); +typedef const GDNativePropertyInfo *(*GDNativeExtensionScriptInstanceGetPropertyList)(GDNativeExtensionScriptInstanceDataPtr p_instance, uint32_t *r_count); +typedef void (*GDNativeExtensionScriptInstanceFreePropertyList)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativePropertyInfo *p_list); +typedef GDNativeVariantType (*GDNativeExtensionScriptInstanceGetPropertyType)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativeStringNamePtr p_name, GDNativeBool *r_is_valid); + +typedef GDNativeObjectPtr (*GDNativeExtensionScriptInstanceGetOwner)(GDNativeExtensionScriptInstanceDataPtr p_instance); +typedef void (*GDNativeExtensionScriptInstancePropertyStateAdd)(const GDNativeStringNamePtr p_name, const GDNativeVariantPtr p_value, void *p_userdata); +typedef void (*GDNativeExtensionScriptInstanceGetPropertyState)(GDNativeExtensionScriptInstanceDataPtr p_instance, GDNativeExtensionScriptInstancePropertyStateAdd p_add_func, void *p_userdata); + +typedef const GDNativeMethodInfo *(*GDNativeExtensionScriptInstanceGetMethodList)(GDNativeExtensionScriptInstanceDataPtr p_instance, uint32_t *r_count); +typedef void (*GDNativeExtensionScriptInstanceFreeMethodList)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativeMethodInfo *p_list); + +typedef GDNativeBool (*GDNativeExtensionScriptInstanceHasMethod)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativeStringNamePtr p_name); + +typedef void (*GDNativeExtensionScriptInstanceCall)(GDNativeExtensionScriptInstanceDataPtr p_self, const GDNativeStringNamePtr p_method, const GDNativeVariantPtr *p_args, const GDNativeInt p_argument_count, GDNativeVariantPtr r_return, GDNativeCallError *r_error); +typedef void (*GDNativeExtensionScriptInstanceNotification)(GDNativeExtensionScriptInstanceDataPtr p_instance, int32_t p_what); +typedef const char *(*GDNativeExtensionScriptInstanceToString)(GDNativeExtensionScriptInstanceDataPtr p_instance, GDNativeBool *r_is_valid); + +typedef void (*GDNativeExtensionScriptInstanceRefCountIncremented)(GDNativeExtensionScriptInstanceDataPtr p_instance); +typedef GDNativeBool (*GDNativeExtensionScriptInstanceRefCountDecremented)(GDNativeExtensionScriptInstanceDataPtr p_instance); + +typedef GDNativeObjectPtr (*GDNativeExtensionScriptInstanceGetScript)(GDNativeExtensionScriptInstanceDataPtr p_instance); +typedef GDNativeBool (*GDNativeExtensionScriptInstanceIsPlaceholder)(GDNativeExtensionScriptInstanceDataPtr p_instance); + +typedef void *GDNativeExtensionScriptLanguagePtr; + +typedef GDNativeExtensionScriptLanguagePtr (*GDNativeExtensionScriptInstanceGetLanguage)(GDNativeExtensionScriptInstanceDataPtr p_instance); + +typedef void (*GDNativeExtensionScriptInstanceFree)(GDNativeExtensionScriptInstanceDataPtr p_instance); + +typedef void *GDNativeScriptInstancePtr; // Pointer to ScriptInstance. + +typedef struct { + GDNativeExtensionScriptInstanceSet set_func; + GDNativeExtensionScriptInstanceGet get_func; + GDNativeExtensionScriptInstanceGetPropertyList get_property_list_func; + GDNativeExtensionScriptInstanceFreePropertyList free_property_list_func; + GDNativeExtensionScriptInstanceGetPropertyType get_property_type_func; + + GDNativeExtensionScriptInstanceGetOwner get_owner_func; + GDNativeExtensionScriptInstanceGetPropertyState get_property_state_func; + + GDNativeExtensionScriptInstanceGetMethodList get_method_list_func; + GDNativeExtensionScriptInstanceFreeMethodList free_method_list_func; + + GDNativeExtensionScriptInstanceHasMethod has_method_func; + + GDNativeExtensionScriptInstanceCall call_func; + GDNativeExtensionScriptInstanceNotification notification_func; + + GDNativeExtensionScriptInstanceToString to_string_func; + + GDNativeExtensionScriptInstanceRefCountIncremented refcount_incremented_func; + GDNativeExtensionScriptInstanceRefCountDecremented refcount_decremented_func; + + GDNativeExtensionScriptInstanceGetScript get_script_func; + + GDNativeExtensionScriptInstanceIsPlaceholder is_placeholder_func; + + GDNativeExtensionScriptInstanceSet set_fallback_func; + GDNativeExtensionScriptInstanceGet get_fallback_func; + + GDNativeExtensionScriptInstanceGetLanguage get_language_func; + + GDNativeExtensionScriptInstanceFree free_func; + +} GDNativeExtensionScriptInstanceInfo; + /* INTERFACE */ typedef struct { @@ -441,6 +525,10 @@ typedef struct { GDNativeObjectPtr (*object_get_instance_from_id)(GDObjectInstanceID p_instance_id); GDObjectInstanceID (*object_get_instance_id)(const GDNativeObjectPtr p_object); + /* SCRIPT INSTANCE */ + + GDNativeScriptInstancePtr (*script_instance_create)(const GDNativeExtensionScriptInstanceInfo *p_info, GDNativeExtensionScriptInstanceDataPtr p_instance_data); + /* CLASSDB */ GDNativeObjectPtr (*classdb_construct_object)(const char *p_classname); /* The passed class must be a built-in godot class, or an already-registered extension class. In both case, object_set_instance should be called to fully initialize the object. */ GDNativeMethodBindPtr (*classdb_get_method_bind)(const char *p_classname, const char *p_methodname, GDNativeInt p_hash); diff --git a/include/godot_cpp/core/method_bind.hpp b/include/godot_cpp/core/method_bind.hpp index 14017d14..ba082e6d 100644 --- a/include/godot_cpp/core/method_bind.hpp +++ b/include/godot_cpp/core/method_bind.hpp @@ -125,21 +125,19 @@ public: virtual ~MethodBind(); }; -template -class MethodBindVarArg : public MethodBind { -public: - typedef Variant (T::*NativeCall)(const Variant **, GDNativeInt, GDNativeCallError &); - +template +class MethodBindVarArgBase : public MethodBind { protected: - NativeCall call_method = nullptr; - MethodInfo arguments; + R(T::*method) + (const Variant **, GDNativeInt, GDNativeCallError &); + MethodInfo method_info; public: virtual GDNativePropertyInfo gen_argument_type_info(int p_arg) const { if (p_arg < 0) { - return arguments.return_val; - } else if (p_arg < arguments.arguments.size()) { - return arguments.arguments[p_arg]; + return _gen_return_type_info(); + } else if (p_arg < method_info.arguments.size()) { + return method_info.arguments[p_arg]; } else { return PropertyInfo(Variant::NIL, "vararg", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT); } @@ -153,50 +151,98 @@ public: return GDNATIVE_EXTENSION_METHOD_ARGUMENT_METADATA_NONE; } - virtual Variant call(GDExtensionClassInstancePtr p_instance, const GDNativeVariantPtr *p_args, const GDNativeInt p_argument_count, GDNativeCallError &r_error) const { - T *instance = static_cast(p_instance); - return (instance->*call_method)((const Variant **)p_args, p_argument_count, r_error); + virtual void ptrcall(GDExtensionClassInstancePtr p_instance, const GDNativeTypePtr *p_args, GDNativeTypePtr r_return) const { + ERR_FAIL(); // Can't call. } - void set_method_info(const MethodInfo &p_info, bool p_return_nil_is_variant) { - set_argument_count((int)p_info.arguments.size()); - if (p_info.arguments.size()) { + virtual bool is_const() const { return false; } + + virtual bool is_vararg() const { return true; } + + MethodBindVarArgBase( + R (T::*p_method)(const Variant **, GDNativeInt, GDNativeCallError &), + const MethodInfo &p_method_info, + bool p_return_nil_is_variant) : + method(p_method), method_info(p_method_info) { + set_argument_count(method_info.arguments.size()); + if (method_info.arguments.size()) { std::vector names; - names.reserve(p_info.arguments.size()); - for (int i = 0; i < p_info.arguments.size(); i++) { - names.push_back(p_info.arguments[i].name); + names.reserve(method_info.arguments.size()); + for (int i = 0; i < method_info.arguments.size(); i++) { + names.push_back(method_info.arguments[i].name); } set_argument_names(names); } - arguments = p_info; - if (p_return_nil_is_variant) { - arguments.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT; + method_info.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT; } - generate_argument_types((int)p_info.arguments.size()); + generate_argument_types((int)method_info.arguments.size()); + set_return(should_returns); } - virtual void ptrcall(GDExtensionClassInstancePtr p_instance, const GDNativeTypePtr *p_args, GDNativeTypePtr r_return) const { - ERR_FAIL(); // Can't call. - } - - void set_method(NativeCall p_method) { call_method = p_method; } - virtual bool is_const() const { return false; } - - virtual bool is_vararg() const { return true; } - - MethodBindVarArg() { - set_return(true); +private: + GDNativePropertyInfo _gen_return_type_info() const { + return reinterpret_cast(this)->_gen_return_type_info_impl(); } }; template -MethodBind *create_vararg_method_bind(Variant (T::*p_method)(const Variant **, GDNativeInt, GDNativeCallError &), const MethodInfo &p_info, bool p_return_nil_is_variant) { - MethodBindVarArg *a = memnew(MethodBindVarArg()); - a->set_method(p_method); - a->set_method_info(p_info, p_return_nil_is_variant); +class MethodBindVarArgT : public MethodBindVarArgBase, T, void, false> { + friend class MethodBindVarArgBase, T, void, false>; + +public: + virtual Variant call(GDExtensionClassInstancePtr p_instance, const GDNativeVariantPtr *p_args, const GDNativeInt p_argument_count, GDNativeCallError &r_error) const { + (static_cast(p_instance)->*MethodBindVarArgBase, T, void, false>::method)((const Variant **)p_args, p_argument_count, r_error); + return {}; + } + + MethodBindVarArgT( + void (T::*p_method)(const Variant **, GDNativeInt, GDNativeCallError &), + const MethodInfo &p_method_info, + bool p_return_nil_is_variant) : + MethodBindVarArgBase, T, void, false>(p_method, p_method_info, p_return_nil_is_variant) { + } + +private: + GDNativePropertyInfo _gen_return_type_info_impl() const { + return {}; + } +}; + +template +MethodBind *create_vararg_method_bind(void (T::*p_method)(const Variant **, GDNativeInt, GDNativeCallError &), const MethodInfo &p_info, bool p_return_nil_is_variant) { + MethodBind *a = memnew((MethodBindVarArgT)(p_method, p_info, p_return_nil_is_variant)); + a->set_instance_class(T::get_class_static()); + return a; +} + +template +class MethodBindVarArgTR : public MethodBindVarArgBase, T, R, true> { + friend class MethodBindVarArgBase, T, R, true>; + +public: + virtual Variant call(GDExtensionClassInstancePtr p_instance, const GDNativeVariantPtr *p_args, const GDNativeInt p_argument_count, GDNativeCallError &r_error) const { + return (static_cast(p_instance)->*MethodBindVarArgBase, T, R, true>::method)((const Variant **)p_args, p_argument_count, r_error); + } + + MethodBindVarArgTR( + R (T::*p_method)(const Variant **, GDNativeInt, GDNativeCallError &), + const MethodInfo &p_info, + bool p_return_nil_is_variant) : + MethodBindVarArgBase, T, R, true>(p_method, p_info, p_return_nil_is_variant) { + } + +private: + GDNativePropertyInfo _gen_return_type_info_impl() const { + return GetTypeInfo::get_class_info(); + } +}; + +template +MethodBind *create_vararg_method_bind(R (T::*p_method)(const Variant **, GDNativeInt, GDNativeCallError &), const MethodInfo &p_info, bool p_return_nil_is_variant) { + MethodBind *a = memnew((MethodBindVarArgTR)(p_method, p_info, p_return_nil_is_variant)); a->set_instance_class(T::get_class_static()); return a; } diff --git a/test/demo/main.gd b/test/demo/main.gd index 16be87cb..1004af11 100644 --- a/test/demo/main.gd +++ b/test/demo/main.gd @@ -13,6 +13,8 @@ func _ready(): var ref = ExampleRef.new() prints("sending ref: ", ref.get_instance_id(), "returned ref: ", $Example.extended_ref_checks(ref).get_instance_id()) prints("vararg args", $Example.varargs_func("some", "arguments", "to", "test")) + prints("vararg_nv ret", $Example.varargs_func_nv("some", "arguments", "to", "test")) + $Example.varargs_func_void("some", "arguments", "to", "test") prints("test array", $Example.test_array()) prints("test dictionary", $Example.test_dictionary()) diff --git a/test/src/example.cpp b/test/src/example.cpp index ce995f87..058b33bc 100644 --- a/test/src/example.cpp +++ b/test/src/example.cpp @@ -65,6 +65,20 @@ void Example::_bind_methods() { ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "varargs_func", &Example::varargs_func, mi); } + { + MethodInfo mi; + mi.arguments.push_back(PropertyInfo(Variant::STRING, "some_argument")); + mi.name = "varargs_func_nv"; + ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "varargs_func_nv", &Example::varargs_func_nv, mi); + } + + { + MethodInfo mi; + mi.arguments.push_back(PropertyInfo(Variant::STRING, "some_argument")); + mi.name = "varargs_func_void"; + ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "varargs_func_void", &Example::varargs_func_void, mi); + } + // Properties. ADD_GROUP("Test group", "group_"); ADD_SUBGROUP("Test subgroup", "group_subgroup_"); @@ -129,10 +143,19 @@ Ref Example::extended_ref_checks(Ref p_ref) const { } Variant Example::varargs_func(const Variant **args, GDNativeInt arg_count, GDNativeCallError &error) { - UtilityFunctions::print("Varargs called with ", String::num((double)arg_count), " arguments"); + UtilityFunctions::print("Varargs (Variant return) called with ", String::num((double)arg_count), " arguments"); return arg_count; } +int Example::varargs_func_nv(const Variant **args, GDNativeInt arg_count, GDNativeCallError &error) { + UtilityFunctions::print("Varargs (int return) called with ", String::num((double)arg_count), " arguments"); + return 42; +} + +void Example::varargs_func_void(const Variant **args, GDNativeInt arg_count, GDNativeCallError &error) { + UtilityFunctions::print("Varargs (no return) called with ", String::num((double)arg_count), " arguments"); +} + void Example::emit_custom_signal(const String &name, int value) { emit_signal("custom_signal", name, value); } diff --git a/test/src/example.h b/test/src/example.h index a15b6f11..fb331a5d 100644 --- a/test/src/example.h +++ b/test/src/example.h @@ -87,6 +87,8 @@ public: ExampleRef *return_extended_ref() const; Ref extended_ref_checks(Ref p_ref) const; Variant varargs_func(const Variant **args, GDNativeInt arg_count, GDNativeCallError &error); + int varargs_func_nv(const Variant **args, GDNativeInt arg_count, GDNativeCallError &error); + void varargs_func_void(const Variant **args, GDNativeInt arg_count, GDNativeCallError &error); void emit_custom_signal(const String &name, int value); Array test_array() const;