main sync #3

Merged
Patrick Busch merged 318 commits from blender/blender:main into main 2023-03-17 15:52:21 +01:00
Showing only changes of commit adfffb7d32 - Show all commits

View File

@ -22,7 +22,7 @@ class InstanceRotationFieldInput final : public bke::InstancesFieldInput {
GVArray get_varray_for_context(const bke::Instances &instances, IndexMask /*mask*/) const final GVArray get_varray_for_context(const bke::Instances &instances, IndexMask /*mask*/) const final
{ {
auto rotation_fn = [&](const int i) -> float3 { 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<float3>::ForFunc(instances.instances_num(), rotation_fn); return VArray<float3>::ForFunc(instances.instances_num(), rotation_fn);