diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc index ab5718a5b42..3e858bcd117 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc @@ -46,7 +46,7 @@ static void node_declare(NodeDeclarationBuilder &b) b.add_output("Points").propagate_all(); b.add_output("Tangent").field_on_all(); b.add_output("Normal").field_on_all(); - b.add_output("Rotation").field_on_all(); + b.add_output("Rotation").field_on_all(); } static void node_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr) @@ -76,12 +76,12 @@ static void node_update(bNodeTree *ntree, bNode *node) static void fill_rotation_attribute(const Span tangents, const Span normals, - MutableSpan rotations) + MutableSpan rotations) { threading::parallel_for(IndexRange(rotations.size()), 512, [&](IndexRange range) { for (const int i : range) { - rotations[i] = float3( - math::to_euler(math::from_orthonormal_axes(normals[i], tangents[i]))); + rotations[i] = math::to_quaternion( + math::from_orthonormal_axes(normals[i], tangents[i])); } }); } @@ -121,8 +121,9 @@ static PointCloud *pointcloud_from_curves(bke::CurvesGeometry curves, MutableAttributeAccessor attributes = curves.attributes_for_write(); const VArraySpan tangents = *attributes.lookup(tangent_id, AttrDomain::Point); const VArraySpan normals = *attributes.lookup(normal_id, AttrDomain::Point); - SpanAttributeWriter rotations = attributes.lookup_or_add_for_write_only_span( - rotation_id, AttrDomain::Point); + SpanAttributeWriter rotations = + attributes.lookup_or_add_for_write_only_span(rotation_id, + AttrDomain::Point); fill_rotation_attribute(tangents, normals, rotations.span); rotations.finish(); }