Fix: Small fixes for NURBS evaluation

Clear the nurbs basis cache dirty flag when its evaluation finishes.
Remove an incorrect assert that the evaluated size couldn't be zero.
It can, when `check_valid_size_and_order` returns false.
This commit is contained in:
Hans Goudey 2022-03-24 22:31:50 -05:00
parent 9b2879f8b3
commit 8ed4638960
2 changed files with 2 additions and 1 deletions

View File

@ -154,7 +154,6 @@ void calculate_basis_cache(const int points_num,
BasisCache &basis_cache)
{
BLI_assert(points_num > 0);
BLI_assert(evaluated_size > 0);
const int8_t degree = order - 1;

View File

@ -578,6 +578,8 @@ void CurvesGeometry::ensure_nurbs_basis_cache() const
}
});
});
this->runtime->nurbs_basis_cache_dirty = false;
}
Span<float3> CurvesGeometry::evaluated_positions() const