Page MenuHome

New Snap Option: Middle

Authored by Germano Cavalcante (mano-wii) on Aug 20 2019, 1:42 AM.



Since deadlines are tight, a snapping solution that uses GPU had to be postponed.

While creating a GPU solution by reusing selection code has its advantages, maintaining a CPU solution is always more secure for different operating systems.

Therefore, in order not to postpone T66337 tasks further, here is the proposal to implement the new "Middle" snapping option over the current code.

Diff Detail

rB Blender

Event Timeline

Suggest to rename this "Edge Mid-point" since it's not obvious this is only for edges.

Later on we could have Face Mid-point too.

It's more an open topic, since I'm on the fence about this one - we could have a separate "Snap to Center" option, which would be used when edge/face snapping modes were enabled.

Don't think this necessarily needs a design task, I've asked in the #ui room in blender-chat what others think.

Changes to the fund icon should be removed from this patch.


Missing braces.


This changes meaning of existing flags.

Existing files now load with volume snapping set by default.

Campbell Barton (campbellbarton) requested changes to this revision.Aug 20 2019, 6:05 PM
This revision now requires changes to proceed.Aug 20 2019, 6:05 PM
Germano Cavalcante (mano-wii) marked 2 inline comments as done.

Strange, some changes I've made before didn't show up here.

  • rename "Middle" to "Edge Mid-point"
  • Missing braces
  • Fix versioning_280

Think this should be called SCE_SNAP_MODE_EDGE_MIDPOINT.


I dont understand why the volume and increment flags are changed, this causes unnecessary versioning and will make files from 2.81 opening in 2.80 to have wrong snap settings.

Why not add SCE_SNAP_MODE_MIDPOINT a the end?

Germano Cavalcante (mano-wii) marked 2 inline comments as done.
  • "Edge Mid-point" -> "Edge Center"
  • Avoid versioning
This revision is now accepted and ready to land.Aug 20 2019, 7:28 PM