[#20441] 3D manipulator widget problem

calculateTransformCenter function passing event to transform init when it shouldn't have.
This commit is contained in:
Martin Poirier 2009-12-21 15:37:19 +00:00
parent 371571fed6
commit 4d32e002ed
3 changed files with 5 additions and 5 deletions

@ -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;

@ -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);
}

@ -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