[Bf-committers] Enhancing the 3d_ruler to filter snapping by selected objects

Isaac Bickerstaff worcesterm at gmail.com
Wed Apr 17 18:27:37 CEST 2013

When using the 3d ruler it's pretty annoying watching the ruler snap to an
object that's miles away behind the scene (also sometimes I only notice
it's done that after I rotate the camera a bit).

I've written a patch that allows the user to toggle snapping mode between
"all" and "selected".

"all" retains the current behaviour

"selected" will only snap a ruler point to a selected object in the 3d view.

I've probably done it in a pretty cack-handed manner[1], so if you could
give some pointers on how to make it better, I'd appreciate it.

[1] I couldn't work out how to snap to selected objects with the current
code, so I added a new SnapMode (SNAP_ONLY_SELECTED) which modifies:

I have no idea how to attach stuff on this mailing list thingy, and I
didn't want to paste it verbatim, so here it is on pastebin:



More information about the Bf-committers mailing list