Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/sculpt_paint/curves_sculpt_ops.cc')
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_ops.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
index 1411f30bffd..47bf7a28352 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_ops.cc
@@ -7,6 +7,7 @@
#include "BKE_bvhutils.h"
#include "BKE_context.h"
#include "BKE_curves.hh"
+#include "BKE_geometry_set.hh"
#include "BKE_lib_id.h"
#include "BKE_mesh.h"
#include "BKE_mesh_runtime.h"
@@ -67,6 +68,7 @@ bool CURVES_SCULPT_mode_poll_view3d(bContext *C)
namespace blender::ed::sculpt_paint {
using blender::bke::CurvesGeometry;
+using blender::fn::CPPType;
/* -------------------------------------------------------------------- */
/** \name * SCULPT_CURVES_OT_brush_stroke
@@ -134,14 +136,7 @@ class DeleteOperation : public CurvesSculptStrokeOperation {
return false;
});
- /* Just reset positions instead of actually removing the curves. This is just a prototype. */
- threading::parallel_for(curves_to_remove.index_range(), 512, [&](const IndexRange range) {
- for (const int curve_i : curves_to_remove.slice(range)) {
- for (const int point_i : curves.range_for_curve(curve_i)) {
- positions[point_i] = {0.0f, 0.0f, 0.0f};
- }
- }
- });
+ curves.remove_curves(curves_to_remove);
curves.tag_positions_changed();
DEG_id_tag_update(&curves_id.id, ID_RECALC_GEOMETRY);