Page MenuHome

Merge to last and first disappear in the menus when using select box, select circle, and select lasso
Closed, InvalidPublic

Description

System Information
Operating system: Windows 7
Graphics card: Geforce GTX 980

Blender Version
Broken: 2.80, hash: 84c06e996a7a, 2019-01-14 19:48

Short description of error
When trying to merge the vertices together, I can only use the select tool to manually select each vertex I want to merge, which will give you the option to merge to the last selected or the first selected. However, if I try to individually select vertices using select box, select circle, and select lasso, only merge at center, merge at cursor, and collapse are available, despite selecting the exact same amount of vertices on the same spots in the same order.

Exact steps for others to reproduce the error

  1. Use the select tool first and select two vertices by selecting one at a time. Then open up the merge menu and see the options "first" and "last".
  2. Switch to the select box tool and do the same thing you did in step 1. The two merge options are missing.
  3. Switch to the select circle tool and do the same thing you did in step 1. The two merge options are missing.
  4. Switch to the select lasso tool and do the same thing you did in step 1. The two merge options are missing.

You can also do this having more than two vertices. Another bonus fact is that if you use the other selections tools, then switch to the selection tool (arrow icon) and pick one last vertex, the option for merging to first and last will actually appear.

Details

Type
Bug

Event Timeline

Jacques Lucke (JacquesLucke) triaged this task as Confirmed, Medium priority.

First I thought that I might have introduced this bug in rBa0df26f00. However, that sees unrelated.

I guess since, box/lasso/circle select don't explicitely set a first/last vertex in general, this information is just not stored anywhere.
Note that you could select many vertices using box select and then select one vertex manually to get the extra merge options.

We have the same problem elsewhere. With the box select tool, you can easily end up in a situation where the active object is not selected, or there is no active object at all. Many tools and commands in Blender act on the active object.

We could solve this and other similar issues by making sure one of the selected items when using the box tool is always active, but it might seem rather arbitrary. It’s a tricky issue.

Technically I would say it's not a bug, but a design issue to do with the fact that we even have the concept of active vs selected in Blender, which can be entirely different.

I can't see any obvious solutions, other that making it so the selection tools try and avoid this by making one of the selected items active.

Right, we could at least make it so that when only one vertex/object is selected with box/circle/lasso select, this will be the new active vertex/object.
Not sure how to handle the case when multiple objects are selected..

Yes, we could do that, but as you say, there's no obvious solution when box selecting multiple objects. We could try and do something smart, like making active the one that is closest to the starting point of the box selection, or if an object is under the cursor when you let go. Something like that.

FYI, Blender has always had this issue from the very beginning - it's fundamental to the issue of active vs selected.

I think trying to be smart like that is the wrong approach.

Instead I'd prefer the following rule: Out of the last vertices/objects that became selected at the same time, pick one at random and make it the new active.
I'd actually suggest to really use a random number generator because otherwise users start to depend on a certain behavior that we might not be able to guarantee.

We could do that - but it would indeed be random, which is not nice. If you then do a merge or join, it will happen relative to a completely random object in your scene. The more deterministic solutions are also weak, but at least repeatable.

In any case, if we did that, we could make it so if the active object or vertex is within the box selection, it stays active. If not, that would be extremely annoying.

Right, I don't want it to be repeatable, because then users start relying on it ;D If someone has a perfect plan on how to make it very predictable, the behavior can be changed later on.
Also if you want to merge/join, the user should be explicit anyway by selecting the new active object individually.

I agree, when the active object was selected before and is still selected, it should stay the active object when using box/lasso/circle select.
That could potentially invert the workflow: Usually, when merging, you select the vertex to merge into last. However with this new approach you could select it first.
This might be bad because it is not consistent with other operations in Blender.
I think we should go for it anyway. Sounds like a good solution to me.

Overall I agree - it's just that the active object is quite important. The active object is the one whose properties you see in the Properties Editor. If it makes a random one active, you'll see a random set of properties here which I expect will seem quite jarring.

IMO it's slightly nicer, although admittedly still weak, if we at least try and do something more deterministic, such as the object that was closest when starting or ending the box selection, if the active object is outside the selection box.

Ok, let's do it. :D

To summarize:
If the previously active object was selected AND it is still selected: don't change the active object.
Otherwise: Find the newly selected object that is the closest to the point where box/circle/lasso-select started. Make this the new active object.

Note, I handled a couple (but probably not all) special cases in the above statement:

  • the previously selected object was not active, but became selected
  • it might be that there is another selected object closer to the point where the select operator is initialized. Already selected objects cannot become the new active object. (maybe that should be different IFF no new object is selected)

Sounds good to me! It will make it a lot less likely to end in the bad state of having active object not be selected, or no active object at all.

Sounds good to me! It will make it a lot less likely to end in the bad state of having active object not be selected, or no active object at all.

Ok, let's do it. :D
To summarize:
If the previously active object was selected AND it is still selected: don't change the active object.
Otherwise: Find the newly selected object that is the closest to the point where box/circle/lasso-select started. Make this the new active object.
Note, I handled a couple (but probably not all) special cases in the above statement:

  • the previously selected object was not active, but became selected
  • it might be that there is another selected object closer to the point where the select operator is initialized. Already selected objects cannot become the new active object. (maybe that should be different IFF no new object is selected)

Really cool to see the discussion about this issue! Really looking forward to seeing what you guys come up with!

Just to give my own two cents, I think that you could make it so that the selection tools function so that if you select several vertices at the same time, it is then considered as a single vertex in a form of a cluster with the average center being the same as if you had used "merge at center". Then when you select something the second time, that is also considered a "vertex" (either single or several vertices). So in the scenario where you want to merge two selections, it will then average out the distance between all the vertices in the cluster that you want to merge towards. It will then merge together the cluster into a single vertex point that the other cluster can then merge to.

This way it doesn't need to be random, since the tools will only remember two states of selection as last and first, which can have one or multiple vertices in each selection, with the only requirement being that you use the select tool twice to make it work. Also, if you do more than two selections, all the previous selections will be added into the "last" selected cluster as a part of its memory, just to avoid losing the stuff you already selected previously when fine adjusting your selection.

Hope that makes sense! ^^

Having no active item is a idiosyncrasy I have found before in previous versions of Blender, never been an actual problem, but is curious case to tackle.
Here is a more complete laydown of all the distinct cases I could think of, hope it helps you get this right.

Active ItemCurrent SelectionNew SelectionSuggested Behavior
No Active itemNo SelectionOnly new items are selectedSet active item from new selection
No Active itemExisting selectionOnly new items are selectedSet active item from new selection
No Active itemExisting selectionIntersects current selectionSet active item from new selection
No Active itemExisting selectionAdds to current selectionSet new active item from new selection
Active item not selectedExisting excludes active itemOnly new items are selected excluding activeSet new active item from new selection (or leave current?)
Active item not selectedExisting excludes active itemOnly new items are selected including activeLeave current active item
Active item not selectedExisting excludes active itemAdds to current selection excluding activeSet new active item from new selection (or leave current?)
Active item not selectedExisting excludes active itemAdds to current selection including activeLeave current active item
Active item not selectedExisting excludes active itemIntersects current selection excluding activeSet new active item from new selection (or leave current?)
Active item not selectedExisting excludes active itemIntersects current selection including activeLeave current active item
Active item in selectionExisting includes active itemOnly new items are selectedSet new active item from new selection
Active item in selectionExisting includes active itemIntersects current selection excluding activeSet new active item from new selection
Active item in selectionExisting includes active itemIntersects current selection including activeLeave current active item
Active item in selectionExisting includes active itemAdds to current selection excluding activeLeave current active item
Active item in selectionExisting includes active itemAdds to current selection including activeLeave current active item

Don't have a strong opinion here but I'd say that the active item should always be the one closest to where border/lasso/paint selected ended (as opposed to first click), since it would be more consistent with what happens with regular click-select.

Ideally though this would even be an operator option one could set in the keymap options on a per-entry basis. A user could then even set different keys for different behaviors, but that is likely out of scope here.

Campbell Barton (campbellbarton) closed this task as Invalid.

Closing since this isn't a bug.

Can be re-opened as a design task with a full proposal of how this applies to all selection tools and modes (nodes, sequence strips, vertices, objects etc).

Also note that simply setting the active item doesn't resolve this report since a first/last are needed. How to correctly set this from lasso or border select for eg isn't well defined and it's disputable if it's even worth attempting to try and *guess* what the user wants in this case.