Pick Shortest Path tool, inconsistent selection #55745

Closed
opened 2018-07-04 02:29:56 +02:00 by Paul R · 29 comments

System Information
Suse Linux 42.2

Blender Version
Broken: 2.79b f4dc9f9d68
Worked: (optional)

Short description of error
The Pick Shortest Path tool has a few oddities:

  • The first face is always selected and unaffected by the tool parameters - depending on the Nth and Skip settings, it should sometimes be unselected to preserve the sequence
  • But the last selected face is correctly influenced by the tool and depending on sequence can be both selected/unselected.
  • The default Offset value of 0 appears to be out by one unit and gives an irregular selection sequence at the start (in the examples given here, start = left side)
  • An Offset value of -1 gives consistent selection results

Exact steps for others to reproduce the error
blender_pick-shortest-path_slideshow_v0.2_upload.mp4
blender_pick-shortest-path_slideshow_v0.2_upload.mkv
Edit: reuploaded video (separate MP4 and MKV provided in case they don't play in all browsers).
pick_shortest_path_selection_seq.blend

See the attached video. But in case it's unavailable in future:

  1. create a plane and stretch it horizontally
  2. loop cut it 99 times (ctrl + r) - this gives 100 faces
  3. lmb on leftmost face, ctrl + rmb on rightmost face
  4. set Nth selection to 2, Skip to 4, Offset to 0
  5. observe that the selection from the left side is (where 0 = unselected, 1 = selected):
    1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, etc
  6. If Offset is changed to -1 and we imagine that the first face is unselected, then the sequence becomes uniform/predictable:
    0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, etc

Alternatively, these steps create a different sequence and might make it easier to see what's happening:

  1. create a plane and stretch it horizontally
  2. loop cut it 99 times (ctrl + r) - this gives 100 faces
  3. lmb on leftmost face, ctrl + rmb on rightmost face
  4. set Nth selection to 5, Skip to 3
  5. observe that the selection from the left side is (where 0 = unselected, 1 = selected):
    1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, etc
  6. If Offset is changed to -1 and we imagine that the first face is unselected, then the sequence is uniform:
    0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, etc
**System Information** Suse Linux 42.2 **Blender Version** Broken: 2.79b f4dc9f9d68b Worked: (optional) **Short description of error** The Pick Shortest Path tool has a few oddities: - The first face is always selected and unaffected by the tool parameters - depending on the Nth and Skip settings, it should sometimes be unselected to preserve the sequence - But the last selected face *is* correctly influenced by the tool and depending on sequence can be both selected/unselected. - The default Offset value of 0 appears to be out by one unit and gives an irregular selection sequence at the start (in the examples given here, start = left side) - An Offset value of -1 gives consistent selection results **Exact steps for others to reproduce the error** [blender_pick-shortest-path_slideshow_v0.2_upload.mp4](https://archive.blender.org/developer/F4101024/blender_pick-shortest-path_slideshow_v0.2_upload.mp4) [blender_pick-shortest-path_slideshow_v0.2_upload.mkv](https://archive.blender.org/developer/F4101032/blender_pick-shortest-path_slideshow_v0.2_upload.mkv) Edit: reuploaded video (separate MP4 and MKV provided in case they don't play in all browsers). [pick_shortest_path_selection_seq.blend](https://archive.blender.org/developer/F4138179/pick_shortest_path_selection_seq.blend) See the attached video. But in case it's unavailable in future: 1. create a plane and stretch it horizontally 2. loop cut it 99 times (ctrl + r) - this gives 100 faces 3. lmb on leftmost face, ctrl + rmb on rightmost face 4. set Nth selection to 2, Skip to 4, Offset to 0 5. observe that the selection from the left side is (where 0 = unselected, 1 = selected): 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, etc 6. If Offset is changed to -1 and we imagine that the first face is unselected, then the sequence becomes uniform/predictable: 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, etc ----- Alternatively, these steps create a different sequence and might make it easier to see what's happening: 1. create a plane and stretch it horizontally 2. loop cut it 99 times (ctrl + r) - this gives 100 faces 3. lmb on leftmost face, ctrl + rmb on rightmost face 4. set Nth selection to 5, Skip to 3 5. observe that the selection from the left side is (where 0 = unselected, 1 = selected): 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, etc 6. If Offset is changed to -1 and we imagine that the first face is unselected, then the sequence is uniform: 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, etc
Author

Added subscriber: @intracube

Added subscriber: @intracube

Added subscriber: @mont29

Added subscriber: @mont29

Please follow our submission template and guidelines, also read these tips about bug reports, and make a complete, valid bug report, with required info, precise description of the issue, precise steps to reproduce it, small and simple .blend and/or other files to do so if needed, etc.
Videos and/or links to external sites etc. are not acceptable as bug report (they can be provided as additional information only).

Please follow our [submission template and guidelines](https:*developer.blender.org/maniphest/task/edit/form/1/), also read [these tips about bug reports](https:*wiki.blender.org/wiki/Process/Bug_Reports), and make a complete, valid bug report, with required info, precise description of the issue, precise steps to reproduce it, **small and simple** .blend and/or other files to do so if needed, etc. Videos and/or links to external sites etc. **are not acceptable** as bug report (they can be provided as additional information **only**).
Author

I'm unsure what the issue is.

I've included the requested info; system info, Blender version, short description of error, exact steps both in video form and written as a step-by-step list.

Since the issue is with an interactive tool, a .blend can't be used to show the issue.

Also, whether it's intended or not, using bold text like that comes across as unnecessary and abrasive.

I'm unsure what the issue is. I've included the requested info; system info, Blender version, short description of error, exact steps both in video form and written as a step-by-step list. Since the issue is with an interactive tool, a .blend can't be used to show the issue. Also, whether it's intended or not, using bold text like that comes across as unnecessary and abrasive.

Added subscribers: @ideasman42, @jenkm

Added subscribers: @ideasman42, @jenkm

@ideasman42 I also believe there is a problem with "Checker Select", in how it calculates the Offset.

@ideasman42 I also believe there is a problem with "Checker Select", in how it calculates the Offset.

Indeed, something looks wrong in the checker logic, will investigate.

PS: What I find abrasive is having to lose time and copy-paste same canned answer countless times every week because people do not read our basic report rules. tracker is already an huge time and energy black hole, those rules are made to help us devs, so that we can quickly check and validate the bug, instead of spending time trying to carefully decipher the report and reproduce it ourselves.

Indeed, something looks wrong in the checker logic, will investigate. PS: What I find abrasive is having to lose time and copy-paste same canned answer countless times every week because people do not read our basic report rules. tracker is already an huge time and energy black hole, those rules are made to help us devs, so that we can quickly check and validate the bug, instead of spending time trying to carefully decipher the report and reproduce it ourselves.

This issue was referenced by bc675d90d0

This issue was referenced by bc675d90d0a17bbd5e52b2549c4e504366052c22

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Author

Hi,

The offset now looks OK, but the first face is still permanently selected so we get sequences like this:
pick_shortest_path_first_face_selected_2.png


Also the Nth value seems to define the number of consecutive selected faces +1

So a value of 16 selects 15 faces. The tooltip also says it 'skips' though it's not clear what.
pick_shortest_path_nth_element_count.png

Hi, The offset now looks OK, but the first face is still permanently selected so we get sequences like this: ![pick_shortest_path_first_face_selected_2.png](https://archive.blender.org/developer/F4238645/pick_shortest_path_first_face_selected_2.png) --- Also the Nth value seems to define the number of consecutive selected faces +1 So a value of 16 selects 15 faces. The tooltip also says it 'skips' though it's not clear what. ![pick_shortest_path_nth_element_count.png](https://archive.blender.org/developer/F4239257/pick_shortest_path_nth_element_count.png)

You select all elements but skip (not select) every Nth, (like 3, 6, 9...).
The Skip - number of consecutive elements to skip (not select) at once. (That breaks the "every Nth" logic.)

That's crazy.

Actually, there should be simply the "Number of Selected" and "Number of Unselected" elements.

You select all elements but skip (not select) every Nth, (like 3, 6, 9...). The Skip - number of consecutive elements to skip (not select) at once. (That breaks the "every Nth" logic.) That's crazy. Actually, there should be simply the "Number of Selected" and "Number of Unselected" elements.
Author

Hi, any update on the first issue?

First face is still always selected, so this should be reopened.

In #55745#527993, @jenkm wrote:
You select all elements but skip (not select) every Nth, (like 3, 6, 9...).
The Skip - number of consecutive elements to skip (not select) at once. (That breaks the "every Nth" logic.)

That's crazy.

Yep, Skip set to any value other than 1 breaks the Nth element spacing.

Here's how the tool could logically work:
nth_logic_fixed_v0.1.gif

  • Skip should only have a range from 1 to the Nth element value -1, otherwise we'd just end up with nothing selected which is pointless.

It might be best to split this into a new task, since it wasn't part of the original report.

Hi, any update on the first issue? First face is still always selected, so this should be reopened. > In #55745#527993, @jenkm wrote: > You select all elements but skip (not select) every Nth, (like 3, 6, 9...). > The Skip - number of consecutive elements to skip (not select) at once. (That breaks the "every Nth" logic.) > > That's crazy. Yep, Skip set to any value other than 1 breaks the Nth element spacing. Here's how the tool could logically work: ![nth_logic_fixed_v0.1.gif](https://archive.blender.org/developer/F4306088/nth_logic_fixed_v0.1.gif) - Skip should only have a range from 1 to the Nth element value -1, otherwise we'd just end up with nothing selected which is pointless. It might be best to split this into a new task, since it wasn't part of the original report.

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'

The "first" element is not the first, it is the previous selection area,
before you perform Pick Shortest Path (or Shortest Path from menu),
so it should remain unchanged.

But then there's still the wrong offset.

And yes, the "Skip Nth" UX/UI very confusing and must be redesigned,
but it's not a bug, so it's not for this bug tracker.

The "first" element is not the first, it is the previous selection area, before you perform Pick Shortest Path (or Shortest Path from menu), so it should remain unchanged. But then there's still the wrong offset. And yes, the "Skip Nth" UX/UI very confusing and must be redesigned, but it's not a bug, so it's not for this bug tracker.
Author

In #55745#529033, @jenkm wrote:
The "first" element is not the first, it is the previous selection area,
before you perform Pick Shortest Path (or Shortest Path from menu),
so it should remain unchanged.

But the first face is included in the sequence pattern, otherwise we'd see an extra selected face at the start: 1110011001100 and that isn't what's happening.

So again, it's kind of inconsistent.

But then there's still the wrong offset.

The offset looks fixed in builds after the 14th Aug. What settings make it work incorrectly for you?

And yes, the "Skip Nth" UX/UI very confusing and must be redesigned,
but it's not a bug, so it's not for this bug tracker.

It's not just confusing, it doesn't do what the manual or interface text suggest.

Right now the tool is actually very close to the alternative logic you described further up: "there should be simply the "Number of Selected" and "Number of Unselected" elements." - if we pretend that the Nth element is 'number of selected' and Skip is 'number of unselected' then the only issue is that the Nth element value is out by one.

> In #55745#529033, @jenkm wrote: > The "first" element is not the first, it is the previous selection area, > before you perform Pick Shortest Path (or Shortest Path from menu), > so it should remain unchanged. But the first face is included in the sequence pattern, otherwise we'd see an extra selected face at the start: 1110011001100 and that isn't what's happening. So again, it's kind of inconsistent. > But then there's still the wrong offset. The offset looks fixed in builds after the 14th Aug. What settings make it work incorrectly for you? > And yes, the "Skip Nth" UX/UI very confusing and must be redesigned, > but it's not a bug, so it's not for this bug tracker. It's not just confusing, it doesn't do what the manual or interface text suggest. Right now the tool is actually very close to the alternative logic you described further up: *"there should be simply the "Number of Selected" and "Number of Unselected" elements."* - if we pretend that the Nth element is *'number of selected'* and Skip is *'number of unselected'* then the only issue is that the Nth element value is out by one.

You have some selected area, in your case it's one element but can be any number (it is the previous selection area).
Then you perform Pick Shortest Path and it adds a new selection.
The previous selection should remain unchanged, i.e. first face in your case.

You have some selected area, in your case it's one element but can be any number (it is the previous selection area). Then you perform Pick Shortest Path and it adds a new selection. The previous selection should remain unchanged, i.e. first face in your case.
Author

In #55745#530185, @jenkm wrote:
You have some selected area, in your case it's one element but can be any number (it is the previous selection area).
Then you perform Pick Shortest Path and it adds a new selection.
The previous selection should remain unchanged, i.e. first face in your case.

Ah ok, so the tool is intentionally additive selection. That makes sense.

The logic all now seems OK if the controls are interpreted as 'number of consecutve selected elements + 1' and 'number of consecutive skipped elements'.

So aside from the Nth value being one unit too high, It's just the general naming/labeling that's out of step.

> In #55745#530185, @jenkm wrote: > You have some selected area, in your case it's one element but can be any number (it is the previous selection area). > Then you perform Pick Shortest Path and it adds a new selection. > The previous selection should remain unchanged, i.e. first face in your case. Ah ok, so the tool is intentionally additive selection. That makes sense. The logic all now seems OK if the controls are interpreted as 'number of consecutve selected elements + 1' and 'number of consecutive skipped elements'. So aside from the Nth value being one unit too high, It's just the general naming/labeling that's out of step.

@intracube can you suggest exact changes, I'll check over them and commit if they make sense regarding the existing logic.

@intracube can you suggest exact changes, I'll check over them and commit if they make sense regarding the existing logic.
Author

@ideasman42 I can't think of a clearer description with the current logic so the existing labels/tooltips are probably best left as-is.

Anything else would need changes to the Nth and Skip, which would then break user scripts. The earlier commit might already do that...

@ideasman42 I can't think of a clearer description with the current logic so the existing labels/tooltips are probably best left as-is. Anything else would need changes to the Nth and Skip, which would then break user scripts. The earlier commit might already do that...

@intracube, I wouldn't worry about breaking user scripts for this particular operator, also with 2.8 we allow some breakage.

@intracube, I wouldn't worry about breaking user scripts for this particular operator, also with 2.8 we allow some breakage.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Campbell Barton self-assigned this 2018-11-27 22:42:41 +01:00

This report talks about subtle changes in behavior, we could address but don't think its urgent.

No response in over a week, closing.

This report talks about subtle changes in behavior, we could address but don't think its urgent. No response in over a week, closing.

There's still the wrong default Offset.

You have one (in this case) selected element:

Shortest-Path-Offset-1.png

Then you Ctrl-click (Pick Shortest Path) last element:

Shortest-Path-Offset-2.png

Note that here the first element is not part of the Pick Shortest Path operation.

By default, we have the wrong offset:

Shortest-Path-Offset-3.png

(in 2.79b) Offset = -2 gives correct results:

Shortest-Path-Offset-4.png

(in 2.80) after this changes bc675d90d0 it works differently but also wrong.

There's still the wrong default Offset. You have one (in this case) selected element: ![Shortest-Path-Offset-1.png](https://archive.blender.org/developer/F7654404/Shortest-Path-Offset-1.png) Then you Ctrl-click (Pick Shortest Path) last element: ![Shortest-Path-Offset-2.png](https://archive.blender.org/developer/F7654405/Shortest-Path-Offset-2.png) Note that here the first element is not part of the Pick Shortest Path operation. By default, we have the wrong offset: ![Shortest-Path-Offset-3.png](https://archive.blender.org/developer/F7654406/Shortest-Path-Offset-3.png) (in 2.79b) Offset = -2 gives correct results: ![Shortest-Path-Offset-4.png](https://archive.blender.org/developer/F7654407/Shortest-Path-Offset-4.png) (in 2.80) after this changes bc675d90d0 it works differently but also wrong.

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'

Tested and the results seem fine to me.

Saying "Note that here the first element is not part of the Pick Shortest Path operation." is more of an opinion.

The way it works now gives even selection grouping which happens to include the first face.

From you're reply it's not clear what you consider correct behavior either.

Tested and the results seem fine to me. Saying *"Note that here the first element is not part of the Pick Shortest Path operation."* is more of an opinion. The way it works now gives even selection grouping which happens to include the first face. From you're reply it's not clear what you consider correct behavior either.

This first face (on the screenshots) is not added during the "Pick Shortest Path", it's not affected by the "Pick Shortest Path" options, and always remains selected.
So, the first (0 index) face for the "Pick Shortest Path" is the face marked in green, here begins the first group.


Let's say we have some selection:

Shortest-Path-Offset-5.jpg

And we add a new one with "Pick Shortest Path":

Shortest-Path-Offset-6.jpg

By default, with Offset = 0, we have a pattern offset by one element.

This first face (on the screenshots) is not added during the "Pick Shortest Path", it's not affected by the "Pick Shortest Path" options, and always remains selected. So, the first (0 index) face for the "Pick Shortest Path" is the face marked in green, here begins the first group. *** Let's say we have some selection: ![Shortest-Path-Offset-5.jpg](https://archive.blender.org/developer/F7654566/Shortest-Path-Offset-5.jpg) And we add a new one with "Pick Shortest Path": ![Shortest-Path-Offset-6.jpg](https://archive.blender.org/developer/F7654567/Shortest-Path-Offset-6.jpg) By default, with Offset = 0, we have a pattern offset by one element.

An even clearer example:

  • select two separate vertices
  • perform Shortest Path from select menu

you can easily see that these two vertices are not affected (always remain selected) by the Shortest Path settings.


Other improvements:

The "Skip every Nth element" logic breaks if the Skip value is not equal to 1.
If the "Nth Element" = 1, it means skip each, that is, there is no effect at all, all elements skipped, but now it works the opposite way.

I suggest changing it to "skip X elements after each Y elements".

  • Skip After: "Skip after N elements, disabled if 0."
  • Skip: "Number of elements to skip."

Skip After = Nth Element - 1

It's a small change, and it's suitable for both "Checker Select" and "Checker Deselect".

An even clearer example: - select two separate vertices - perform **Shortest Path** from select menu you can easily see that these two vertices are not affected (always remain selected) by the Shortest Path settings. *** Other improvements: The "Skip every Nth element" logic breaks if the Skip value is not equal to 1. If the "Nth Element" = 1, it means skip each, that is, there is no effect at all, all elements skipped, but now it works the opposite way. I suggest changing it to "skip X elements after each Y elements". - **Skip After**: "Skip after N elements, disabled if 0." - **Skip**: "Number of elements to skip." *Skip After = Nth Element - 1* It's a small change, and it's suitable for both "Checker Select" and "Checker Deselect".

This issue was referenced by 0381727663

This issue was referenced by 0381727663ec405916565f0f5f677bdb7e6ac510

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
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
5 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#55745
No description provided.