only initialize snap from the scene settings for view3d and image spaces since snap...
[blender.git] / source / blender / editors / transform / transform_snap.c
index f677e1ac6b41e402e4d73f7487470fded4fac803..ca89670dedb308d85ca4fb9e3c241319bf230e8c 100644 (file)
@@ -467,14 +467,17 @@ void initSnapping(TransInfo *t, wmOperator *op)
        /* use scene defaults only when transform is modal */
        else if (t->flag & T_MODAL)
        {
-               if (ts->snap_flag & SCE_SNAP) {
-                       t->modifiers |= MOD_SNAP;
-               }
+               if(ELEM(t->spacetype, SPACE_VIEW3D, SPACE_IMAGE))
+               {
+                       if (ts->snap_flag & SCE_SNAP) {
+                               t->modifiers |= MOD_SNAP;
+                       }
 
-               t->tsnap.align = ((t->settings->snap_flag & SCE_SNAP_ROTATE) == SCE_SNAP_ROTATE);
-               t->tsnap.project = ((t->settings->snap_flag & SCE_SNAP_PROJECT) == SCE_SNAP_PROJECT);
-               t->tsnap.snap_self = !((t->settings->snap_flag & SCE_SNAP_NO_SELF) == SCE_SNAP_NO_SELF);
-               t->tsnap.peel = ((t->settings->snap_flag & SCE_SNAP_PROJECT) == SCE_SNAP_PROJECT);
+                       t->tsnap.align = ((t->settings->snap_flag & SCE_SNAP_ROTATE) == SCE_SNAP_ROTATE);
+                       t->tsnap.project = ((t->settings->snap_flag & SCE_SNAP_PROJECT) == SCE_SNAP_PROJECT);
+                       t->tsnap.snap_self = !((t->settings->snap_flag & SCE_SNAP_NO_SELF) == SCE_SNAP_NO_SELF);
+                       t->tsnap.peel = ((t->settings->snap_flag & SCE_SNAP_PROJECT) == SCE_SNAP_PROJECT);
+               }
        }
        
        t->tsnap.target = snap_target;