Fix Animation::subtract_variant for affine transforms

(cherry picked from commit 87935ca837)
This commit is contained in:
kleonc 2023-07-10 13:49:24 +02:00 committed by Yuri Sizov
parent 605f1c0936
commit c6c5b5bf78
1 changed files with 2 additions and 2 deletions

View File

@ -5565,10 +5565,10 @@ Variant Animation::subtract_variant(const Variant &a, const Variant &b) {
return (b.operator Quaternion()).inverse() * (a.operator Quaternion()); return (b.operator Quaternion()).inverse() * (a.operator Quaternion());
} }
case Variant::TRANSFORM2D: { case Variant::TRANSFORM2D: {
return (b.operator Transform2D()).inverse() * (a.operator Transform2D()); return (b.operator Transform2D()).affine_inverse() * (a.operator Transform2D());
} }
case Variant::TRANSFORM3D: { case Variant::TRANSFORM3D: {
return (b.operator Transform3D()).inverse() * (a.operator Transform3D()); return (b.operator Transform3D()).affine_inverse() * (a.operator Transform3D());
} }
default: { default: {
return Variant::evaluate(Variant::OP_SUBTRACT, a, b); return Variant::evaluate(Variant::OP_SUBTRACT, a, b);