Curves: Add remove_selection function #104813

Merged
Falk David merged 5 commits from filedescriptor/blender:curves-remove-selection-function into blender-v3.5-release 2023-02-16 15:26:24 +01:00
2 changed files with 4 additions and 1 deletions
Showing only changes of commit 1b5eddca70 - Show all commits

View File

@ -1097,7 +1097,6 @@ static int delete_exec(bContext *C, wmOperator * /*op*/)
{
for (Curves *curves_id : get_unique_editable_curves(*C)) {
bke::CurvesGeometry &curves = curves_id->geometry.wrap();
if (remove_selection(curves, eAttrDomain(curves_id->selection_domain))) {
filedescriptor marked this conversation as resolved
Review

Picky: might as well remove this newline here too, doesn't seem helpful anymore

Picky: might as well remove this newline here too, doesn't seem helpful anymore
DEG_id_tag_update(&curves_id->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_GEOM | ND_DATA, curves_id);

View File

@ -189,6 +189,10 @@ bool select_circle(const ViewContext &vc,
/** \name Editing
* \{ */
/**
filedescriptor marked this conversation as resolved
Review
/**
 * Remove (dissolve) selected curves or points based on the ".selection" attribute.
 */
``` /** * Remove (dissolve) selected curves or points based on the ".selection" attribute. */ ```
* Remove (dissolve) selected curves or points based on the ".selection" attribute.
* \returns true if any point or curve was removed.
*/
bool remove_selection(bke::CurvesGeometry &curves, eAttrDomain selection_domain);
/** \} */