Curve deselection won't work if the selection included end control points #55218

Closed
opened 2018-05-26 18:39:56 +02:00 by Hoang Duy Tran · 8 comments
Member

According to the definition of the curve deselection:

"Reduce current selection by deselecting boundary elements";

as listed in the following block of code (editcurve_select.c):

void CURVE_OT_select_less(wmOperatorType *ot)
{
	/* identifiers */
	ot->name = "Select Less";
	ot->idname = "CURVE_OT_select_less";
	ot->description = "Reduce current selection by deselecting boundary elements";

	/* api callbacks */
	ot->exec = select_less_exec;
	ot->poll = ED_operator_editsurfcurve;

	/* flags */
	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}

However, if you extend the selection to include end control points, the function ceases to work. Here is an screenshot of the test:

Screenshot from 2018-05-26 17-20-58.png

and here is the test file used, with the latest version 2.79.4 (May 26 2018 01:43:00).

20180526_select_deselect_first_last_part_of_curve_0001.blend

How to see it:

  • RMB select the center control point
  • Use 'Ctrl+NUMPAD_+' once to extend the selection to two control points next to it.
  • Use 'Ctrl+NUMPAD_-' once to deselect the two control points just extended. It works.
  • Use 'Ctrl+NUMPAD_+' twice to extend the selection to include end control points as well.
  • Use 'Ctrl+NUMPAD_-' once to deselect. No shrinkage of selection has been performed. It DOESN'T work.
According to the definition of the curve deselection: ``` "Reduce current selection by deselecting boundary elements"; ``` as listed in the following block of code (editcurve_select.c): ``` void CURVE_OT_select_less(wmOperatorType *ot) { /* identifiers */ ot->name = "Select Less"; ot->idname = "CURVE_OT_select_less"; ot->description = "Reduce current selection by deselecting boundary elements"; /* api callbacks */ ot->exec = select_less_exec; ot->poll = ED_operator_editsurfcurve; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } ``` However, if you extend the selection to include end control points, the function ceases to work. Here is an screenshot of the test: ![Screenshot from 2018-05-26 17-20-58.png](https://archive.blender.org/developer/F3469612/Screenshot_from_2018-05-26_17-20-58.png) and here is the test file used, with the latest version 2.79.4 (May 26 2018 01:43:00). [20180526_select_deselect_first_last_part_of_curve_0001.blend](https://archive.blender.org/developer/F3469623/20180526_select_deselect_first_last_part_of_curve_0001.blend) How to see it: - RMB select the center control point - Use 'Ctrl+NUMPAD_+' once to extend the selection to two control points next to it. - Use 'Ctrl+NUMPAD_-' once to deselect the two control points just extended. It works. - Use 'Ctrl+NUMPAD_+' twice to extend the selection to include end control points as well. - Use 'Ctrl+NUMPAD_-' once to deselect. No shrinkage of selection has been performed. It DOESN'T work.
Author
Member

Added subscriber: @hoanguk

Added subscriber: @hoanguk
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Only happens if all controlpoints are selected, right?
(I have no trouble selecting less, if say an "end" controlpoint and two neighbors are selected)

Only happens if **all** controlpoints are selected, right? (I have no trouble selecting less, if say an "end" controlpoint and two neighbors are selected)
Author
Member

Yes, you're right Philipp, if every end control points are selected then 'Select Less' doesn't work.

Yes, you're right Philipp, if every end control points are selected then 'Select Less' doesn't work.
Member

Checked code again, and this looks like this is actually happening on purpose.

See following comment:

/* first and last are exceptions */

So code always treats neighbors of endpoints as selected.

Not sure if we should compare this to other types? Not even sure if consistency really plays a big role here?

  • GreasePencil shrinks from the endpoints
  • Hair doesnt shrink on endpoints
  • Mesh doesnt shrink on endpoints (considers selection borders only if there are unselected neighbors)

For now, will treat as Known Issue...

Checked code again, and this looks like this is actually happening on purpose. See following comment: > /* first and last are exceptions */ So code always treats neighbors of endpoints as selected. Not sure if we should compare this to other types? Not even sure if consistency really plays a big role here? - GreasePencil shrinks from the endpoints - Hair doesnt shrink on endpoints - Mesh doesnt shrink on endpoints (considers selection borders only if there are unselected neighbors) For now, will treat as Known Issue...

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'
Campbell Barton self-assigned this 2020-06-17 10:10:56 +02:00

This is working as intended, although we could add option to de-select boundaries.

Committed change to description 7dae6eb5a2

This is working as intended, although we could add option to de-select boundaries. Committed change to description 7dae6eb5a2
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blender/blender#55218
No description provided.