Revision: 30222
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30222
Author:   blendix
Date:     2010-07-12 13:17:42 +0200 (Mon, 12 Jul 2010)

Log Message:
-----------
2.5: remove user preferences to always snap for translate/rotate/scale,
with new behavior of the snap setting in the 3d view these are no longer
necessary.

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/space_userpref.py
    trunk/blender/source/blender/editors/transform/transform_snap.c
    trunk/blender/source/blender/makesdna/DNA_userdef_types.h
    trunk/blender/source/blender/makesrna/intern/rna_userdef.c

Modified: trunk/blender/release/scripts/ui/space_userpref.py
===================================================================
--- trunk/blender/release/scripts/ui/space_userpref.py  2010-07-12 11:04:51 UTC 
(rev 30221)
+++ trunk/blender/release/scripts/ui/space_userpref.py  2010-07-12 11:17:42 UTC 
(rev 30222)
@@ -280,13 +280,6 @@
         row.separator()
 
         col = row.column()
-        col.label(text="Snap:")
-        col.prop(edit, "snap_translate", text="Translate")
-        col.prop(edit, "snap_rotate", text="Rotate")
-        col.prop(edit, "snap_scale", text="Scale")
-        col.separator()
-        col.separator()
-        col.separator()
         col.label(text="Grease Pencil:")
         col.prop(edit, "grease_pencil_manhattan_distance", text="Manhattan 
Distance")
         col.prop(edit, "grease_pencil_euclidean_distance", text="Euclidean 
Distance")

Modified: trunk/blender/source/blender/editors/transform/transform_snap.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_snap.c     
2010-07-12 11:04:51 UTC (rev 30221)
+++ trunk/blender/source/blender/editors/transform/transform_snap.c     
2010-07-12 11:17:42 UTC (rev 30222)
@@ -1897,27 +1897,14 @@
 
 
 void snapGrid(TransInfo *t, float *val) {
-       int invert;
        GearsType action;
 
        // Only do something if using Snap to Grid
        if (t->tsnap.mode != SCE_SNAP_MODE_INCREMENT)
                return;
 
-       if(t->mode==TFM_ROTATION || t->mode==TFM_WARP || t->mode==TFM_TILT || 
t->mode==TFM_TRACKBALL || t->mode==TFM_BONE_ROLL)
-               invert = U.flag & USER_AUTOROTGRID;
-       else if(t->mode==TFM_RESIZE || t->mode==TFM_SHEAR || 
t->mode==TFM_BONESIZE || t->mode==TFM_SHRINKFATTEN || 
t->mode==TFM_CURVE_SHRINKFATTEN)
-               invert = U.flag & USER_AUTOSIZEGRID;
-       else
-               invert = U.flag & USER_AUTOGRABGRID;
+       action = activeSnap(t) ? BIG_GEARS : NO_GEARS;
 
-       if(invert) {
-               action = activeSnap(t) ? NO_GEARS: BIG_GEARS;
-       }
-       else {
-               action = activeSnap(t) ? BIG_GEARS : NO_GEARS;
-       }
-
        if (action == BIG_GEARS && (t->modifiers & MOD_PRECISION)) {
                action = SMALL_GEARS;
        }

Modified: trunk/blender/source/blender/makesdna/DNA_userdef_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_userdef_types.h   2010-07-12 
11:04:51 UTC (rev 30221)
+++ trunk/blender/source/blender/makesdna/DNA_userdef_types.h   2010-07-12 
11:17:42 UTC (rev 30222)
@@ -390,9 +390,9 @@
 
 /* flag */
 #define USER_AUTOSAVE                  (1 << 0)
-#define USER_AUTOGRABGRID              (1 << 1)
-#define USER_AUTOROTGRID               (1 << 2)
-#define USER_AUTOSIZEGRID              (1 << 3)
+#define USER_AUTOGRABGRID              (1 << 1)        /* deprecated */
+#define USER_AUTOROTGRID               (1 << 2)        /* deprecated */
+#define USER_AUTOSIZEGRID              (1 << 3)        /* deprecated */
 #define USER_SCENEGLOBAL               (1 << 4)
 #define USER_TRACKBALL                 (1 << 5)
 #define USER_DUPLILINK                 (1 << 6)

Modified: trunk/blender/source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_userdef.c  2010-07-12 
11:04:51 UTC (rev 30221)
+++ trunk/blender/source/blender/makesrna/intern/rna_userdef.c  2010-07-12 
11:17:42 UTC (rev 30222)
@@ -2124,19 +2124,6 @@
        RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_GLOBALUNDO);
        RNA_def_property_ui_text(prop, "Global Undo", "Global undo works by 
keeping a full copy of the file itself in memory, so takes extra memory");
 
-       /* snapping */
-       prop= RNA_def_property(srna, "snap_translate", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOGRABGRID);
-       RNA_def_property_ui_text(prop, "Enable Translation Snap", "Snap objects 
and sub-objects to grid units when moving");
-
-       prop= RNA_def_property(srna, "snap_rotate", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOROTGRID);
-       RNA_def_property_ui_text(prop, "Enable Rotation Snap", "Snap objects 
and sub-objects to grid units when rotating");
-
-       prop= RNA_def_property(srna, "snap_scale", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSIZEGRID);
-       RNA_def_property_ui_text(prop, "Enable Scaling Snap", "Snap objects and 
sub-objects to grid units when scaling");
-       
        /* auto keyframing */   
        prop= RNA_def_property(srna, "use_auto_keying", PROP_BOOLEAN, 
PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to