From eb3d720bd916ce808e1bf4a760545c13cfb0de5d Mon Sep 17 00:00:00 2001 From: Martin Poirier Date: Sun, 7 Jan 2007 19:33:00 +0000 Subject: === Transform Snapping === Snap/Grid icon button in 3D view header (edit mesh). FIXME NOTICE: make nice looking icons (yes, that's for you Matt) When snap is on, a drop down appears for the target method (closest, median, center) Hotkey to toggle snap is Shift-Tab (this was previously used for a not totally equivalent to Tab. Ton said OK to scrap it). That hotkey is currently restricted to edit mesh (where snap is currently restricted). Changed a couple of ugliness on how snap settings are stored. --- source/blender/makesdna/DNA_view3d_types.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source/blender/makesdna/DNA_view3d_types.h') diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 451c9c231c2..9b71af3cc15 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -137,7 +137,9 @@ typedef struct View3D { short gridsubdiv; /* Number of subdivisions in the grid between each highlighted grid line */ - short pad2[2]; + short snap_target; + + short pad2; void *properties_storage; /* Nkey panel stores stuff here, not in file */ @@ -166,10 +168,11 @@ typedef struct View3D { #define V3D_OPP_DIRECTION_NAME 1 #define V3D_FLYMODE 2 #define V3D_TRANSFORM_SNAP 4 -#define V3D_SNAP_TARGET (8|16) + +/* View3d->snap_target */ #define V3D_SNAP_TARGET_CLOSEST 0 -#define V3D_SNAP_TARGET_CENTER 8 -#define V3D_SNAP_TARGET_MEDIAN 16 +#define V3D_SNAP_TARGET_CENTER 1 +#define V3D_SNAP_TARGET_MEDIAN 2 /* View3D->around */ -- cgit v1.2.3