From adfffb7d32a2f8e09ad43aae6d6b51c50cb2807e Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Sun, 12 Mar 2023 05:55:06 +0100 Subject: [PATCH] Fix: normalize matrix before converting to euler Without this, Blender aborts due to an assert. --- .../nodes/geometry/nodes/node_geo_input_instance_rotation.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_instance_rotation.cc b/source/blender/nodes/geometry/nodes/node_geo_input_instance_rotation.cc index c508814caa8..ab31ab3c218 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_input_instance_rotation.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_input_instance_rotation.cc @@ -22,7 +22,7 @@ class InstanceRotationFieldInput final : public bke::InstancesFieldInput { GVArray get_varray_for_context(const bke::Instances &instances, IndexMask /*mask*/) const final { auto rotation_fn = [&](const int i) -> float3 { - return float3(math::to_euler(instances.transforms()[i])); + return float3(math::to_euler(math::normalize(instances.transforms()[i]))); }; return VArray::ForFunc(instances.instances_num(), rotation_fn);