GPv3: Cyclical set operator #111904
@ -891,6 +891,11 @@ static int grease_pencil_cyclical_set_exec(bContext *C, wmOperator *op)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Return to stop from creating unneeded attribute. */
|
||||
if (mode == CyclicalMode::OPEN && !curves.attributes().contains("cyclic")) {
|
||||
return;
|
||||
}
|
||||
|
||||
MutableSpan<bool> cyclic = curves.cyclic_for_write();
|
||||
|
||||
IndexMaskMemory memory;
|
||||
@ -908,6 +913,11 @@ static int grease_pencil_cyclical_set_exec(bContext *C, wmOperator *op)
|
||||
break;
|
||||
}
|
||||
|
||||
/* Remove the attribute if it is empty. */
|
||||
if (!ed::curves::has_anything_selected(curves.cyclic(), curves.curves_range())) {
|
||||
casey-bianco-davis marked this conversation as resolved
Outdated
|
||||
curves.attributes_for_write().remove("cyclic");
|
||||
}
|
||||
|
||||
changed = true;
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user
This doesn't need to run in "Close" mode.