Curves: Add select linked #104569
|
@ -164,7 +164,7 @@ bool has_anything_selected(const bke::CurvesGeometry &curves)
|
||||||
return !selection || contains(selection, true);
|
return !selection || contains(selection, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool has_any_selected(const GSpan selection)
|
bool has_anything_selected(const GSpan selection)
|
||||||
{
|
{
|
||||||
if (selection.type().is<bool>()) {
|
if (selection.type().is<bool>()) {
|
||||||
return selection.typed<bool>().contains(true);
|
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) {
|
threading::parallel_for(curves.curves_range(), 256, [&](const IndexRange range) {
|
||||||
for (const int curve_i : range) {
|
for (const int curve_i : range) {
|
||||||
GMutableSpan selection_curve = selection.span.slice(points_by_curve[curve_i]);
|
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);
|
fill_selection_true(selection_curve);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.
|
* Return true if any element in the span is selected, on either domain with either type.
|
||||||
*/
|
*/
|
||||||
filedescriptor marked this conversation as resolved
|
|||||||
bool has_any_selected(const GSpan selection);
|
bool has_anything_selected(GSpan selection);
|
||||||
filedescriptor marked this conversation as resolved
Hans Goudey
commented
Not that it's better, but maybe using the same name 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),
|
* Find curves that have any point selected (a selection factor greater than zero),
|
||||||
|
|
Loading…
Reference in New Issue
const GSpan selection
->GSpan selection