Curves: Add select linked #104569

Merged
Falk David merged 5 commits from filedescriptor/blender:curves-select-linked into main 2023-02-10 18:58:10 +01:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit fefe499f0d - Show all commits

View File

@ -164,7 +164,7 @@ bool has_anything_selected(const bke::CurvesGeometry &curves)
return !selection || contains(selection, true);
}
bool has_any_selected(const GSpan selection)
bool has_anything_selected(const GSpan selection)
{
if (selection.type().is<bool>()) {
return selection.typed<bool>().contains(true);
@ -258,7 +258,7 @@ void select_linked(bke::CurvesGeometry &curves)
threading::parallel_for(curves.curves_range(), 256, [&](const IndexRange range) {
for (const int curve_i : range) {
GMutableSpan selection_curve = selection.span.slice(points_by_curve[curve_i]);
if (has_any_selected(selection_curve)) {
if (has_anything_selected(selection_curve)) {
fill_selection_true(selection_curve);
}
}

View File

@ -92,7 +92,7 @@ bool has_anything_selected(const bke::CurvesGeometry &curves);
/**
* Return true if any element in the span is selected, on either domain with either type.
*/
filedescriptor marked this conversation as resolved
Review

const GSpan selection -> GSpan selection

`const GSpan selection` -> `GSpan selection`
bool has_any_selected(const GSpan selection);
bool has_anything_selected(GSpan selection);
filedescriptor marked this conversation as resolved
Review

Not that it's better, but maybe using the same name has_anything_selected would be better for consistency?

Not that it's better, but maybe using the same name `has_anything_selected` would be better for consistency?
/**
* Find curves that have any point selected (a selection factor greater than zero),