Revision: 14906
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14906
Author:   theeth
Date:     2008-05-21 12:02:07 +0200 (Wed, 21 May 2008)

Log Message:
-----------
[#11748] Bevel tool not snapping when holding down ctrl and adjusting value

Added proper gear support and fixed some misc errors in the setup of this 
transformation (negative values hav no effect, so use absolute value and other 
small things like that)

Modified Paths:
--------------
    trunk/blender/source/blender/src/transform.c

Modified: trunk/blender/source/blender/src/transform.c
===================================================================
--- trunk/blender/source/blender/src/transform.c        2008-05-20 21:30:16 UTC 
(rev 14905)
+++ trunk/blender/source/blender/src/transform.c        2008-05-21 10:02:07 UTC 
(rev 14906)
@@ -3348,8 +3348,17 @@
 {
        t->mode = TFM_BEVEL;
        t->flag |= T_NO_CONSTRAINT;
+       t->num.flag |= NUM_NO_NEGATIVE;
        t->transform = Bevel;
        t->handleEvent = handleEventBevel;
+
+       t->idx_max = 0;
+       t->num.idx_max = 0;
+       t->snap[0] = 0.0f;
+       t->snap[1] = 0.1f;
+       t->snap[2] = t->snap[1] * 0.1f;
+
+       /* DON'T KNOW WHY THIS IS NEEDED */
        if (G.editBMesh->imval[0] == 0 && G.editBMesh->imval[1] == 0) {
                /* save the initial mouse co */
                G.editBMesh->imval[0] = t->imval[0];
@@ -3405,7 +3414,11 @@
 
        mode = (G.editBMesh->options & BME_BEVEL_VERT) ? "verts only" : 
"normal";
        distance = InputHorizontalAbsolute(t, mval)/4; /* 4 just seemed a nice 
value to me, nothing special */
+       
+       distance = fabs(distance);
 
+       snapGrid(t, &distance);
+
        applyNumInput(&t->num, &distance);
 
        /* header print for NumInput */
@@ -3414,7 +3427,7 @@
 
                outputNumInput(&(t->num), c);
 
-               sprintf(str, "Bevel: %s", c);
+               sprintf(str, "Bevel - Dist: %s, Mode: %s (MMB to toggle))", c, 
mode);
        }
        else {
                /* default header print */


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to