[Bf-blender-cvs] [8ed46389601] master: Fix: Small fixes for NURBS evaluation
Hans Goudey
noreply at git.blender.org
Fri Mar 25 04:31:58 CET 2022
Commit: 8ed46389601dc3a2aa4cb180e079c6512858b77e
Author: Hans Goudey
Date: Thu Mar 24 22:31:50 2022 -0500
Branches: master
https://developer.blender.org/rB8ed46389601dc3a2aa4cb180e079c6512858b77e
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.
===================================================================
M source/blender/blenkernel/intern/curve_nurbs.cc
M source/blender/blenkernel/intern/curves_geometry.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/curve_nurbs.cc b/source/blender/blenkernel/intern/curve_nurbs.cc
index 31fe5426b5b..0114c0b45f4 100644
--- a/source/blender/blenkernel/intern/curve_nurbs.cc
+++ b/source/blender/blenkernel/intern/curve_nurbs.cc
@@ -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;
diff --git a/source/blender/blenkernel/intern/curves_geometry.cc b/source/blender/blenkernel/intern/curves_geometry.cc
index e31a983e0bb..5bb6a97fa49 100644
--- a/source/blender/blenkernel/intern/curves_geometry.cc
+++ b/source/blender/blenkernel/intern/curves_geometry.cc
@@ -578,6 +578,8 @@ void CurvesGeometry::ensure_nurbs_basis_cache() const
}
});
});
+
+ this->runtime->nurbs_basis_cache_dirty = false;
}
Span<float3> CurvesGeometry::evaluated_positions() const
More information about the Bf-blender-cvs
mailing list