Page MenuHome

New Snap Option: Middle
ClosedPublic

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

Details

Summary

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

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

source/blender/editors/transform/transform_snap_object.c
2261

Missing braces.

source/blender/makesdna/DNA_scene_types.h
2049–2051

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
source/blender/makesdna/DNA_scene_types.h
2049–2050

Think this should be called SCE_SNAP_MODE_EDGE_MIDPOINT.

2049–2051

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.
  • SCE_SNAP_MODE_MIDPOINT -> SCE_SNAP_MODE_EDGE_MIDPOINT
  • "Edge Mid-point" -> "Edge Center"
  • Avoid versioning
This revision is now accepted and ready to land.Aug 20 2019, 7:28 PM