From bd6ed3fb091d2d541f85e4152f0538088a3956db Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Tue, 15 Jun 2021 21:15:38 -0400 Subject: Allow multiplying Transforms and Basis by numbers --- core/variant/variant_op.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/variant') diff --git a/core/variant/variant_op.cpp b/core/variant/variant_op.cpp index 10d0a83014..e7badd22b8 100644 --- a/core/variant/variant_op.cpp +++ b/core/variant/variant_op.cpp @@ -1458,6 +1458,8 @@ void Variant::_register_variant_operators() { register_op>(Variant::OP_MULTIPLY, Variant::COLOR, Variant::FLOAT); register_op>(Variant::OP_MULTIPLY, Variant::TRANSFORM2D, Variant::TRANSFORM2D); + register_op>(Variant::OP_MULTIPLY, Variant::TRANSFORM2D, Variant::INT); + register_op>(Variant::OP_MULTIPLY, Variant::TRANSFORM2D, Variant::FLOAT); register_op>(Variant::OP_MULTIPLY, Variant::TRANSFORM2D, Variant::VECTOR2); register_op>(Variant::OP_MULTIPLY, Variant::VECTOR2, Variant::TRANSFORM2D); register_op>(Variant::OP_MULTIPLY, Variant::TRANSFORM2D, Variant::RECT2); @@ -1466,6 +1468,8 @@ void Variant::_register_variant_operators() { register_op, Vector, Transform2D>>(Variant::OP_MULTIPLY, Variant::PACKED_VECTOR2_ARRAY, Variant::TRANSFORM2D); register_op>(Variant::OP_MULTIPLY, Variant::TRANSFORM3D, Variant::TRANSFORM3D); + register_op>(Variant::OP_MULTIPLY, Variant::TRANSFORM3D, Variant::INT); + register_op>(Variant::OP_MULTIPLY, Variant::TRANSFORM3D, Variant::FLOAT); register_op>(Variant::OP_MULTIPLY, Variant::TRANSFORM3D, Variant::VECTOR3); register_op>(Variant::OP_MULTIPLY, Variant::VECTOR3, Variant::TRANSFORM3D); register_op>(Variant::OP_MULTIPLY, Variant::TRANSFORM3D, Variant::AABB); @@ -1474,6 +1478,8 @@ void Variant::_register_variant_operators() { register_op, Vector, Transform3D>>(Variant::OP_MULTIPLY, Variant::PACKED_VECTOR3_ARRAY, Variant::TRANSFORM3D); register_op>(Variant::OP_MULTIPLY, Variant::BASIS, Variant::BASIS); + register_op>(Variant::OP_MULTIPLY, Variant::BASIS, Variant::INT); + register_op>(Variant::OP_MULTIPLY, Variant::BASIS, Variant::FLOAT); register_op>(Variant::OP_MULTIPLY, Variant::BASIS, Variant::VECTOR3); register_op>(Variant::OP_MULTIPLY, Variant::VECTOR3, Variant::BASIS); -- cgit v1.2.3