Page MenuHome

Snapping closest vertex with Pivot point set to Individual Origins
Closed, ResolvedPublic

Description

System Information
Win 10 64bit, GTX 970 (x2)

Blender Version
Broken: 2,76b official release
Worked: (optional)

Short description of error
If you set Pivot point to Individual Origins and you try to snap the closest vertex it does not work - instead it always uses the Median Snap Target(or maybe Center - I am not sure). I am not completely sure if this is a bug but IMHO it should snap to closest vertex no matter what pivot point do I use.

Exact steps for others to reproduce the error

  1. Open the attached blend
  2. In edit mode move the selected cube in x axis and try to snap it to a vertex of the other cube. It does not use the closest vertex but a median point instead.
  3. Solution: Change Pivot point to any other option and the snapping works as expected.

Event Timeline

Marek Moravec (marek) set Type to Bug.
Marek Moravec (marek) created this task.
Marek Moravec (marek) raised the priority of this task from to Needs Triage by Developer.
Campbell Barton (campbellbarton) triaged this task as Confirmed, Medium priority.

Using the 'center' for snapping makes sense normally, but agree in this case its not ideal.

This is a general system though. So having exceptions needs to be handled carefully.

Possible fix, P295

@Germano Cavalcante (mano-wii) maybe you’ll be interested by this one? You’re our snapping expert now. ;)

I don't see the need to calculate islands when translating. I propose to skip the island detection in this case

Possible fix 2, P444

@Germano Cavalcante (mano-wii) Meh… don’t really have strong opinion here :/

I’d say, go by your solution, looks like it makes sense, and we can always revert and try something else if it creates other issues (pretty hard to predict what can cause what in that code).

Islands could be useful to identify the center of the groups when "Snap Target" is "Center" instead of "Closest".
But it does not work like that now and will not work that way after applying that "possible fix 2".

One solution to this case ( "Snap Target: Center") would be to preserve "island_info" (instead of freeing) and use its information to find the nearest center