diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-09-25 08:11:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-09-25 08:11:57 +0400 |
commit | 4ad6ac1caddcecc7e6a00f316cf60ea4d8b2aa38 (patch) | |
tree | a2dae2c4fa462f5110a00b389dbe93ab96edd0d7 /source/blender/src/transform_snap.c | |
parent | 2c0db4d707f02f747496308565de0d902d55f5aa (diff) |
store snapping in the scene, (theeth's suggestion)
Diffstat (limited to 'source/blender/src/transform_snap.c')
-rw-r--r-- | source/blender/src/transform_snap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/src/transform_snap.c b/source/blender/src/transform_snap.c index 5b4ead1f519..ce3212c63fa 100644 --- a/source/blender/src/transform_snap.c +++ b/source/blender/src/transform_snap.c @@ -174,7 +174,7 @@ void initSnapping(TransInfo *t) if (t->tsnap.applySnap != NULL && // A snapping function actually exist (G.obedit != NULL && G.obedit->type==OB_MESH) && // Temporary limited to edit mode meshes - (G.vd->flag2 & V3D_TRANSFORM_SNAP) && // Only if the snap flag is on + (G.scene->snap_flag & SCE_SNAP) && // Only if the snap flag is on (t->flag & T_PROP_EDIT) == 0) // No PET, obviously { t->tsnap.status |= SNAP_ON; @@ -197,17 +197,17 @@ void setSnappingCallback(TransInfo *t) { t->tsnap.calcSnap = CalcSnapGeometry; - switch(G.vd->snap_target) + switch(G.scene->snap_target) { - case V3D_SNAP_TARGET_CLOSEST: + case SCE_SNAP_TARGET_CLOSEST: t->tsnap.modeTarget = SNAP_CLOSEST; t->tsnap.targetSnap = TargetSnapClosest; break; - case V3D_SNAP_TARGET_CENTER: + case SCE_SNAP_TARGET_CENTER: t->tsnap.modeTarget = SNAP_CENTER; t->tsnap.targetSnap = TargetSnapCenter; break; - case V3D_SNAP_TARGET_MEDIAN: + case SCE_SNAP_TARGET_MEDIAN: t->tsnap.modeTarget = SNAP_MEDIAN; t->tsnap.targetSnap = TargetSnapMedian; break; @@ -224,7 +224,7 @@ void setSnappingCallback(TransInfo *t) t->tsnap.distance = RotationBetween; // Can't do TARGET_CENTER with rotation, use TARGET_MEDIAN instead - if (G.vd->snap_target == V3D_SNAP_TARGET_CENTER) { + if (G.scene->snap_target == SCE_SNAP_TARGET_CENTER) { t->tsnap.modeTarget = SNAP_MEDIAN; t->tsnap.targetSnap = TargetSnapMedian; } |