Merge branch 'blender-v3.3-release'
This commit is contained in:
@@ -740,11 +740,14 @@ Span<float3> CurvesGeometry::evaluated_tangents() const
|
|||||||
const IndexRange points = this->points_for_curve(curve_index);
|
const IndexRange points = this->points_for_curve(curve_index);
|
||||||
const IndexRange evaluated_points = this->evaluated_points_for_curve(curve_index);
|
const IndexRange evaluated_points = this->evaluated_points_for_curve(curve_index);
|
||||||
|
|
||||||
if (handles_right[points.first()] != positions[points.first()]) {
|
const float epsilon = 1e-6f;
|
||||||
|
if (!math::almost_equal_relative(
|
||||||
|
handles_right[points.first()], positions[points.first()], epsilon)) {
|
||||||
tangents[evaluated_points.first()] = math::normalize(handles_right[points.first()] -
|
tangents[evaluated_points.first()] = math::normalize(handles_right[points.first()] -
|
||||||
positions[points.first()]);
|
positions[points.first()]);
|
||||||
}
|
}
|
||||||
if (handles_left[points.last()] != positions[points.last()]) {
|
if (!math::almost_equal_relative(
|
||||||
|
handles_left[points.last()], positions[points.last()], epsilon)) {
|
||||||
tangents[evaluated_points.last()] = math::normalize(positions[points.last()] -
|
tangents[evaluated_points.last()] = math::normalize(positions[points.last()] -
|
||||||
handles_left[points.last()]);
|
handles_left[points.last()]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user