diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-09-20 08:46:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-20 08:46:51 +0200 |
commit | 89417ba75b59f26147218af8d08fced7152a80fa (patch) | |
tree | 116f12bfe78db7d3f3f60a8ea6ccbba91b1e2737 /core/variant | |
parent | 0e5b0c025ce3d4ad8082cbeb5394423854c2e25f (diff) | |
parent | aa82cb6f35f76ba89c7d7cafe023d1e574045182 (diff) |
Merge pull request #52398 from deakcor/dev-transform
Diffstat (limited to 'core/variant')
-rw-r--r-- | core/variant/variant_call.cpp | 3 | ||||
-rw-r--r-- | core/variant/variant_construct.cpp | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index 49a0b455df..4a7d6761d8 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -1702,6 +1702,7 @@ static void _register_variant_builtin_methods() { bind_method(Transform2D, get_rotation, sarray(), varray()); bind_method(Transform2D, get_origin, sarray(), varray()); bind_method(Transform2D, get_scale, sarray(), varray()); + bind_method(Transform2D, get_skew, sarray(), varray()); bind_method(Transform2D, orthonormalized, sarray(), varray()); bind_method(Transform2D, rotated, sarray("phi"), varray()); bind_method(Transform2D, scaled, sarray("scale"), varray()); @@ -1711,6 +1712,8 @@ static void _register_variant_builtin_methods() { bind_method(Transform2D, interpolate_with, sarray("xform", "weight"), varray()); bind_method(Transform2D, is_equal_approx, sarray("xform"), varray()); bind_method(Transform2D, set_rotation, sarray("rotation"), varray()); + bind_method(Transform2D, set_scale, sarray("scale"), varray()); + bind_method(Transform2D, set_skew, sarray("skew"), varray()); bind_method(Transform2D, looking_at, sarray("target"), varray(Vector2())); /* Basis */ diff --git a/core/variant/variant_construct.cpp b/core/variant/variant_construct.cpp index a1a2bec369..4317b9dc98 100644 --- a/core/variant/variant_construct.cpp +++ b/core/variant/variant_construct.cpp @@ -114,6 +114,7 @@ void Variant::_register_variant_constructors() { add_constructor<VariantConstructNoArgs<Transform2D>>(sarray()); add_constructor<VariantConstructor<Transform2D, Transform2D>>(sarray("from")); add_constructor<VariantConstructor<Transform2D, float, Vector2>>(sarray("rotation", "position")); + add_constructor<VariantConstructor<Transform2D, float, Size2, float, Vector2>>(sarray("rotation", "scale", "skew", "position")); add_constructor<VariantConstructor<Transform2D, Vector2, Vector2, Vector2>>(sarray("x_axis", "y_axis", "origin")); add_constructor<VariantConstructNoArgs<Plane>>(sarray()); |