Commit: ef4a83de9d67120767ec03a43c06ff836a469cdc
Author: Julian Eisel
Date:   Sat Nov 28 00:52:08 2015 +0100
Branches: wiggly-widgets
https://developer.blender.org/rBef4a83de9d67120767ec03a43c06ff836a469cdc

Remove redundant transform flag for manipulator

Could actually be removed in master as well.

===================================================================

M       source/blender/editors/transform/transform.c
M       source/blender/editors/transform/transform.h
M       source/blender/editors/transform/transform_constraints.c

===================================================================

diff --git a/source/blender/editors/transform/transform.c 
b/source/blender/editors/transform/transform.c
index 57688ca..80d1630 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1690,7 +1690,7 @@ static void drawHelpline(bContext *UNUSED(C), int x, int 
y, void *customdata)
 {
        TransInfo *t = (TransInfo *)customdata;
 
-       if (t->helpline != HLP_NONE && !(t->flag & T_USES_MANIPULATOR)) {
+       if (t->helpline != HLP_NONE) {
                float vecrot[3], cent[2];
                int mval[2];
 
@@ -3391,7 +3391,7 @@ static void ElementResize(TransInfo *t, TransData *td, 
float mat[3][3])
        constraintTransLim(t, td);
 }
 
-static void applyResize(TransInfo *t, const int mval[2])
+static void applyResize(TransInfo *t, const int UNUSED(mval[2]))
 {
        TransData *td;
        float mat[3][3];
@@ -3402,15 +3402,7 @@ static void applyResize(TransInfo *t, const int mval[2])
                copy_v3_v3(t->values, t->auto_values);
        }
        else {
-               float ratio;
-
-               /* for manipulator, center handle, the scaling can't be done 
relative to center */
-               if ((t->flag & T_USES_MANIPULATOR) && t->con.mode == 0) {
-                       ratio = 1.0f - ((t->mouse.imval[0] - mval[0]) + 
(t->mouse.imval[1] - mval[1])) / 100.0f;
-               }
-               else {
-                       ratio = t->values[0];
-               }
+               float ratio = t->values[0];
 
                copy_v3_fl(t->values, ratio);
 
@@ -5199,23 +5191,14 @@ static void ElementBoneSize(TransInfo *t, TransData 
*td, float mat[3][3])
        td->loc[1] = oldy;
 }
 
-static void applyBoneSize(TransInfo *t, const int mval[2])
+static void applyBoneSize(TransInfo *t, const int UNUSED(mval[2]))
 {
        TransData *td = t->data;
        float size[3], mat[3][3];
-       float ratio;
+       float ratio = t->values[0];
        int i;
        char str[MAX_INFO_LEN];
-       
-       // TRANSFORM_FIX_ME MOVE TO MOUSE INPUT
-       /* for manipulator, center handle, the scaling can't be done relative 
to center */
-       if ((t->flag & T_USES_MANIPULATOR) && t->con.mode == 0) {
-               ratio = 1.0f - ((t->mouse.imval[0] - mval[0]) + 
(t->mouse.imval[1] - mval[1])) / 100.0f;
-       }
-       else {
-               ratio = t->values[0];
-       }
-       
+
        copy_v3_fl(size, ratio);
        
        snapGridIncrement(t, size);
diff --git a/source/blender/editors/transform/transform.h 
b/source/blender/editors/transform/transform.h
index 39b137f..2d37465 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -461,8 +461,7 @@ typedef struct TransInfo {
 #define T_CAMERA               (1 << 4)
                 // trans on points, having no rotation/scale
 #define T_POINTS               (1 << 6)
-               // for manipulator exceptions, like scaling using center point, 
drawing help lines
-#define T_USES_MANIPULATOR     (1 << 7)
+/* empty slot - (1 << 7) */
 
        /* restrictions flags */
 #define T_ALL_RESTRICTIONS     ((1 << 8)|(1 << 9)|(1 << 10))
diff --git a/source/blender/editors/transform/transform_constraints.c 
b/source/blender/editors/transform/transform_constraints.c
index 9fd5b72..41dec01 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -668,8 +668,6 @@ void drawConstraint(TransInfo *t)
                return;
        if (!(tc->mode & CON_APPLY))
                return;
-       if (t->flag & T_USES_MANIPULATOR)
-               return;
        if (t->flag & T_NO_CONSTRAINT)
                return;

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

Reply via email to