From 5319e6af7b396be87af54a0bf56ca86dc4e888cf Mon Sep 17 00:00:00 2001 From: Iliya Katueshenock Date: Tue, 19 Mar 2024 05:29:38 +0100 Subject: [PATCH] Fix: Geometry Nodes: Separate Transform node Fix of wrong destination for scale and non-normalized rotation matrix. Pull Request: https://projects.blender.org/blender/blender/pulls/119602 --- .../nodes/function/nodes/node_fn_separate_transform.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/blender/nodes/function/nodes/node_fn_separate_transform.cc b/source/blender/nodes/function/nodes/node_fn_separate_transform.cc index 20bb5216ad1..9ee66a4b478 100644 --- a/source/blender/nodes/function/nodes/node_fn_separate_transform.cc +++ b/source/blender/nodes/function/nodes/node_fn_separate_transform.cc @@ -57,11 +57,12 @@ class SeparateTransformFunction : public mf::MultiFunction { } if (rotation.is_empty() && !scale.is_empty()) { - mask.foreach_index([&](const int64_t i) { location[i] = math::to_scale(transforms[i]); }); + mask.foreach_index([&](const int64_t i) { scale[i] = math::to_scale(transforms[i]); }); } else if (!rotation.is_empty() && scale.is_empty()) { - mask.foreach_index( - [&](const int64_t i) { rotation[i] = math::to_quaternion(transforms[i]); }); + mask.foreach_index([&](const int64_t i) { + rotation[i] = math::to_quaternion(math::normalize(float3x3(transforms[i]))); + }); } else if (!rotation.is_empty() && !scale.is_empty()) { mask.foreach_index([&](const int64_t i) {