Disable for now Transform/3d (#47)

This commit is contained in:
Rafał Mikrut 2021-04-27 21:19:36 +02:00 committed by GitHub
parent aa250456ed
commit a70971532b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 13 deletions

View File

@ -272,7 +272,9 @@ func check_if_is_allowed(method_data : Dictionary) -> bool:
var t : int = arg.get("type")
if t == TYPE_CALLABLE:
return false
elif !(t == TYPE_NIL|| t == TYPE_MAX|| t == TYPE_AABB|| t == TYPE_ARRAY|| t == TYPE_BASIS|| t == TYPE_BOOL|| t == TYPE_COLOR|| t == TYPE_COLOR_ARRAY|| t == TYPE_DICTIONARY|| t == TYPE_INT|| t == TYPE_INT32_ARRAY|| t == TYPE_INT64_ARRAY|| t == TYPE_NODE_PATH|| t == TYPE_OBJECT|| t == TYPE_PLANE|| t == TYPE_QUAT|| t == TYPE_RAW_ARRAY|| t == TYPE_FLOAT|| t == TYPE_FLOAT32_ARRAY|| t == TYPE_FLOAT64_ARRAY|| t == TYPE_RECT2|| t == TYPE_RECT2I|| t == TYPE_RID|| t == TYPE_STRING|| t == TYPE_STRING_NAME|| t == TYPE_STRING_ARRAY|| t == TYPE_TRANSFORM|| t == TYPE_TRANSFORM2D|| t == TYPE_VECTOR2|| t == TYPE_VECTOR2I|| t == TYPE_VECTOR2_ARRAY|| t == TYPE_VECTOR3|| t == TYPE_VECTOR3I|| t == TYPE_VECTOR3_ARRAY):
# if t == TYPE_TRANSFORM: # Look at GH 38430
# return false
elif !(t == TYPE_NIL|| t == TYPE_MAX|| t == TYPE_AABB|| t == TYPE_ARRAY|| t == TYPE_BASIS|| t == TYPE_BOOL|| t == TYPE_COLOR|| t == TYPE_COLOR_ARRAY|| t == TYPE_DICTIONARY|| t == TYPE_INT|| t == TYPE_INT32_ARRAY|| t == TYPE_INT64_ARRAY|| t == TYPE_NODE_PATH|| t == TYPE_OBJECT|| t == TYPE_PLANE|| t == TYPE_QUAT|| t == TYPE_RAW_ARRAY|| t == TYPE_FLOAT|| t == TYPE_FLOAT32_ARRAY|| t == TYPE_FLOAT64_ARRAY|| t == TYPE_RECT2|| t == TYPE_RECT2I|| t == TYPE_RID|| t == TYPE_STRING|| t == TYPE_STRING_NAME|| t == TYPE_STRING_ARRAY|| t == TYPE_TRANSFORM2D|| t == TYPE_VECTOR2|| t == TYPE_VECTOR2I|| t == TYPE_VECTOR2_ARRAY|| t == TYPE_VECTOR3|| t == TYPE_VECTOR3I|| t == TYPE_VECTOR3_ARRAY):
print("----------------------------------------------------------- TODO - MISSING TYPE, ADD SUPPORT IT")
return false

View File

@ -105,9 +105,9 @@ func create_gdscript_arguments(arguments: Array) -> Array:
elif typ ==TYPE_STRING_ARRAY:
sa.type = "PackedStringArray"
sa.value = "PackedStringArray([])"
elif typ ==TYPE_TRANSFORM:
sa.type = "Transform"
sa.value = ValueCreator.get_transform_string()
# elif typ ==TYPE_TRANSFORM:
# sa.type = "Transform"
# sa.value = ValueCreator.get_transform_string()
elif typ ==TYPE_TRANSFORM2D:
sa.type = "Transform2D"
sa.value = ValueCreator.get_transform2D_string()
@ -210,8 +210,8 @@ func parse_and_return_objects(method_data: Dictionary, debug_print: bool = false
arguments_array.push_back(StringName(ValueCreator.get_string()))
elif type == TYPE_STRING_ARRAY:
arguments_array.push_back(PackedStringArray([]))
elif type == TYPE_TRANSFORM:
arguments_array.push_back(ValueCreator.get_transform())
# elif type == TYPE_TRANSFORM:
# arguments_array.push_back(ValueCreator.get_transform())
elif type == TYPE_TRANSFORM2D:
arguments_array.push_back(ValueCreator.get_transform2D())
elif type == TYPE_VECTOR2:

View File

@ -85,11 +85,11 @@ func get_aabb() -> AABB:
func get_aabb_string() -> String:
return "AABB(" + get_vector3_string() + ", " + get_vector3_string() + ")"
func get_transform() -> Transform:
return Transform(get_vector3(),get_vector3(),get_vector3(),get_vector3())
func get_transform_string() -> String:
return "Transform(" + get_vector3_string() + ", " + get_vector3_string() + ", " + get_vector3_string() + ", " + get_vector3_string() + ")"
#func get_transform() -> Transform:
# return Transform(get_vector3(),get_vector3(),get_vector3(),get_vector3())
#
#func get_transform_string() -> String:
# return "Transform(" + get_vector3_string() + ", " + get_vector3_string() + ", " + get_vector3_string() + ", " + get_vector3_string() + ")"
func get_transform2D() -> Transform2D:
return Transform2D(get_vector2(),get_vector2(),get_vector2())