Fix: Grease Pencil: Sculpt Smooth Tool Bezier Handles

This makes so that bezier handles will be smoothed by the `Smooth Tool`.

Note: A `BLI_assert` is removed, the logic used was wrong.

Pull Request: https://projects.blender.org/blender/blender/pulls/141912
This commit is contained in:
Casey Bianco-Davis
2025-08-04 14:23:53 +02:00
committed by Falk David
parent 3e181be081
commit 6e7eb4d7b6
2 changed files with 3 additions and 11 deletions

View File

@@ -199,7 +199,6 @@ void write_all_positions(bke::CurvesGeometry &curves,
{
return;
}
BLI_assert(curves_selection.size() * 3 == all_positions.size());
const OffsetIndices points_by_curve = curves.points_by_curve();
MutableSpan<float3> positions = curves.positions_for_write();

View File

@@ -147,16 +147,9 @@ void SmoothOperation::on_stroke_extended(const bContext &C, const InputSample &e
bool changed = false;
if (sculpt_mode_flag & GP_SCULPT_FLAGMODE_APPLY_POSITION) {
MutableSpan<float3> positions = curves.positions_for_write();
geometry::smooth_curve_attribute(curves.curves_range(),
points_by_curve,
selection_varray,
cyclic,
iterations,
influences,
false,
false,
positions);
geometry::smooth_curve_positions(
curves, curves.curves_range(), iterations, influences, false, false);
params.drawing.tag_positions_changed();
changed = true;
}