GPv3: Select Alternate #109240
|
@ -274,6 +274,10 @@ void select_linked(bke::CurvesGeometry &curves)
|
|||
|
||||
void select_alternate(bke::CurvesGeometry &curves, const bool deselect_ends)
|
||||
{
|
||||
if (!has_anything_selected(curves)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const OffsetIndices points_by_curve = curves.points_by_curve();
|
||||
Lorenzo-Carpaneto marked this conversation as resolved
Outdated
|
||||
bke::GSpanAttributeWriter selection = ensure_selection_attribute(
|
||||
curves, ATTR_DOMAIN_POINT, CD_PROP_BOOL);
|
||||
Lorenzo-Carpaneto marked this conversation as resolved
Pratik Borhade
commented
Hi, looks like this operator is only supported in point selection mode. Hi, looks like this operator is only supported in point selection mode.
In that case, we could change the poll function to `editable_grease_pencil_point_selection_poll`
Falk David
commented
That is correct, yes. Should be changed. That is correct, yes. Should be changed.
Pratik Borhade
commented
I'll commit then directly? (or want a PR again?) Edit: pushed to main: I'll commit then directly? (or want a PR again?)
Edit: pushed to main: 51a5be891308e174e2bd8bc862bdde41545b08d1
Falk David
commented
Thank you @PratikPB2123 Thank you @PratikPB2123
|
||||
|
|
Loading…
Reference in New Issue
The
ensure_selection_attribute
call already makes sure we have abool
attribute. No need for the assert here.It doesn't actually. The type argument is only used when the selection attribute doesn't exist yet. So if the selection already has a float type, this operator will have to support that or change the attribute's type to boolean.
what do we want to do? We could template the function and support both selection; we could change the selection type, we could do nothing and prevent the user to use this if the type of selection isn't bool...
Since there is no exposed way of creating a
float
selection at the moment, I would just remove the assert and leave it as is.Then we are ready to merge this pr I think :)