Page MenuHome

Pick Shortest Path tool, inconsistent selection
Open, Needs Triage by DeveloperPublic

Description

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


Edit: reuploaded video (separate MP4 and MKV provided in case they don't play in all browsers).

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

  1. 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

  1. 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

Event Timeline

Paul R (intracube) updated the task description. (Show Details)
Bastien Montagne (mont29) triaged this task as Needs Information from User priority.

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).

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.

@Campbell Barton (campbellbarton) I also believe there is a problem with "Checker Select", in how it calculates the Offset.

Bastien Montagne (mont29) raised the priority of this task from Needs Information from User to Confirmed, Medium.Aug 13 2018, 3:59 PM

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.

Hi,

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


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.

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.

Hi, any update on the first issue?

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

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:

  • 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.

Yevgeny Makarov (jenkm) raised the priority of this task from Confirmed, Medium to Needs Triage by Developer.

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 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.

Paul R (intracube) added a comment.EditedAug 26 2018, 8:28 PM

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.

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

@Campbell Barton (campbellbarton) 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...

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

Campbell Barton (campbellbarton) closed this task as Archived.EditedNov 27 2018, 10:42 PM

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:

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

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

By default, we have the wrong offset:

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

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

Yevgeny Makarov (jenkm) reopened this task as Open.Thu, Aug 8, 3:02 PM

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:

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

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

An even clearer example:

  1. select two separate vertices
  2. 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".