Cleanup: Remove duplicate special case check
This commit is contained in:
parent
a4813379f9
commit
efd7c95bb2
Notes:
blender-bot
2023-02-14 11:07:28 +01:00
Referenced by issue #90530, Display render preview mode not updating with GPU Compute.
|
@ -201,6 +201,7 @@ static void calculate_tangents(Span<float3> positions,
|
|||
MutableSpan<float3> tangents)
|
||||
{
|
||||
if (positions.size() == 1) {
|
||||
tangents.first() = float3(0.0f, 0.0f, 1.0f);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -241,13 +242,8 @@ Span<float3> Spline::evaluated_tangents() const
|
|||
|
||||
Span<float3> positions = this->evaluated_positions();
|
||||
|
||||
if (eval_size == 1) {
|
||||
evaluated_tangents_cache_.first() = float3(1.0f, 0.0f, 0.0f);
|
||||
}
|
||||
else {
|
||||
calculate_tangents(positions, is_cyclic_, evaluated_tangents_cache_);
|
||||
this->correct_end_tangents();
|
||||
}
|
||||
calculate_tangents(positions, is_cyclic_, evaluated_tangents_cache_);
|
||||
this->correct_end_tangents();
|
||||
|
||||
tangent_cache_dirty_ = false;
|
||||
return evaluated_tangents_cache_;
|
||||
|
|
Loading…
Reference in New Issue