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

Campbell Barton ideasman42 at gmail.com
Thu Apr 18 19:42:18 CEST 2013

Hi Isaac,

The first point added was snapped always, but I've removed this since
it can be annoying as you say - r56151.

Do you think there are other times when you would intentionally snap
(by holding ctrl) but only want to snap onto other selected objects?
... if so would you give an example? (blend file ideally)

Did a quick check of the patch and it seems fine, perhaps there should
be a more clever way to filter out objects long term - but it follows
existing method fine for now.

On Thu, Apr 18, 2013 at 2:27 AM, Isaac Bickerstaff <worcesterm at gmail.com> wrote:
> 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:
> source/blender/editors/include/ED_transform.h
> source/blender/editors/transform/transform_snap.c
> 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:
> http://pastebin.com/mVJjJbfK
> --
> tubs
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers

- Campbell

More information about the Bf-committers mailing list