forked from blender/blender
main sync #3
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user