WIP: GEO: Copy curve selection #117869

Draft
Iliya Katushenock wants to merge 4 commits from mod_moder/blender:copy_selected_curve_points into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 4 additions and 3 deletions
Showing only changes of commit a4b6c1b64d - Show all commits

View File

@ -1838,7 +1838,10 @@ static bool grease_pencil_separate_selected(bContext &C,
info.frame_number);
drawing_dst.strokes_for_write() = bke::curves_copy_point_selection(
curves_src, selected_points, {});
curves_src = remove_points_and_split(curves_src, selected_points);
const IndexMask inverted = selected_points.complement(IndexRange(curves_src.points_num()),
memory);
curves_src = geometry::copy_curve_points(curves_src, inverted, {});
info.drawing.tag_topology_changed();
drawing_dst.tag_topology_changed();

View File

@ -63,8 +63,6 @@ bke::CurvesGeometry copy_curve_points(
const OffsetIndices<int> points_by_curve = src_curves.points_by_curve();
IndexMaskMemory memory;
/* TODO: IndexMask is large structure, better to use some raw-slice to point to single mask data.
*/
Array<IndexMask> curves_masks(points_by_curve.size());
split_mask_for_ranges(points_by_curve, points_mask, curves_masks);
Array<int> curves_subdivision(points_by_curve.size() + 1, 0);