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
This commit is contained in:
Iliya Katueshenock
2024-03-19 05:29:38 +01:00
committed by Hans Goudey
parent 38dc888d7f
commit 5319e6af7b

View File

@@ -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) {