Fix: Incorrect assert conditions in NURBSpline
This fix provides better conditions for asserts in `NURBSpline::knots` method accounting for cyclic NURBS curves. Differential Revision: https://developer.blender.org/D13620
This commit is contained in:
parent
76cb11e332
commit
70de992afe
|
@ -257,13 +257,13 @@ void NURBSpline::calculate_knots() const
|
|||
Span<float> NURBSpline::knots() const
|
||||
{
|
||||
if (!knots_dirty_) {
|
||||
BLI_assert(knots_.size() == this->size() + order_);
|
||||
BLI_assert(knots_.size() == this->knots_size());
|
||||
return knots_;
|
||||
}
|
||||
|
||||
std::lock_guard lock{knots_mutex_};
|
||||
if (!knots_dirty_) {
|
||||
BLI_assert(knots_.size() == this->size() + order_);
|
||||
BLI_assert(knots_.size() == this->knots_size());
|
||||
return knots_;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue