[#20441] 3D manipulator widget problem
authorMartin Poirier <theeth@yahoo.com>
Mon, 21 Dec 2009 15:37:19 +0000 (15:37 +0000)
committerMartin Poirier <theeth@yahoo.com>
Mon, 21 Dec 2009 15:37:19 +0000 (15:37 +0000)
calculateTransformCenter function passing event to transform init when it shouldn't have.

source/blender/editors/include/ED_transform.h
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/transform/transform.c

index 065867a3bb36d3f1af453198d59b86bd9fea856e..6388c4552be927324335d38b6feba7289ed4275b 100644 (file)
@@ -95,7 +95,7 @@ enum {
  * returns 1 if successful, 0 otherwise (usually means there's no selection)
  * (if 0 is returns, *vec is unmodified)
  * */
-int calculateTransformCenter(struct bContext *C, struct wmEvent *event, int centerMode, float *vec);
+int calculateTransformCenter(struct bContext *C, int centerMode, float *vec);
 
 struct TransInfo;
 struct ScrArea;
index 3a4dc1029439d94aff666f255c9f3cc1b3530037..43caf85e1bc6e518dc8b3640c9bdf2feb099fc4e 100644 (file)
@@ -304,7 +304,7 @@ static void viewops_data_create(bContext *C, wmOperator *op, wmEvent *event)
        if (vod->use_dyn_ofs) {
                VECCOPY(vod->ofs, rv3d->ofs);
                /* If there's no selection, lastofs is unmodified and last value since static */
-               calculateTransformCenter(C, event, V3D_CENTROID, lastofs);
+               calculateTransformCenter(C, V3D_CENTROID, lastofs);
                VECCOPY(vod->dyn_ofs, lastofs);
                mul_v3_fl(vod->dyn_ofs, -1.0f);
        }
index 36e8032b64014bd8c1e3786799defdab01e248b9..a6b5e677ca23f5e409a7cb6b602cd116d0f089ad 100644 (file)
@@ -1100,7 +1100,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
                return OPERATOR_PASS_THROUGH;
 }
 
-int calculateTransformCenter(bContext *C, wmEvent *event, int centerMode, float *vec)
+int calculateTransformCenter(bContext *C, int centerMode, float *vec)
 {
        TransInfo *t = MEM_callocN(sizeof(TransInfo), "TransInfo data");
        int success = 1;
@@ -1111,9 +1111,9 @@ int calculateTransformCenter(bContext *C, wmEvent *event, int centerMode, float
 
        t->mode = TFM_DUMMY;
 
-       initTransInfo(C, t, NULL, event);                                       // internal data, mouse, vectors
+       initTransInfo(C, t, NULL, NULL);        // internal data, mouse, vectors
 
-       createTransData(C, t);                  // make TransData structs from selection
+       createTransData(C, t);                          // make TransData structs from selection
 
        t->around = centerMode;                         // override userdefined mode