Bretch's patch for 2D transform. Thanks
[blender.git] / source / blender / src / transform_numinput.c
index 6c2546970118a2a9061a49162ab01b7ca77ac89b..aa35af7d312fd931192683be9480108d0292e516 100755 (executable)
@@ -103,8 +103,11 @@ short hasNumInput(NumInput *n)
 void applyNumInput(NumInput *n, float *vec)
 {
        short i, j;
+       float val[3];
 
        if (hasNumInput(n)) {
+               convertDisplayNumToVec(n->val, val);
+
                for (j=0; j<=n->idx_max; j++) {
                        /* if AFFECTALL and no number typed and cursor not on number, use first number */
                        if (n->flag & NUM_AFFECT_ALL && n->idx != j && n->ctrl[j] == 0)
@@ -115,11 +118,11 @@ void applyNumInput(NumInput *n, float *vec)
                        if (n->ctrl[i] == 0 && n->flag & NUM_NULL_ONE) {
                                vec[j] = 1.0f;
                        }
-                       else if (n->val[i] == 0.0f && n->flag & NUM_NO_ZERO) {
+                       else if (val[i] == 0.0f && n->flag & NUM_NO_ZERO) {
                                vec[j] = 0.0001f;
                        }
                        else {
-                               vec[j] = n->val[i];
+                               vec[j] = val[i];
                        }
                }
        }