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.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#55218
No description provided.