forked from bartvdbraak/blender
[#20441] 3D manipulator widget problem
calculateTransformCenter function passing event to transform init when it shouldn't have.
This commit is contained in:
parent
371571fed6
commit
4d32e002ed
@ -95,7 +95,7 @@ enum {
|
|||||||
* returns 1 if successful, 0 otherwise (usually means there's no selection)
|
* returns 1 if successful, 0 otherwise (usually means there's no selection)
|
||||||
* (if 0 is returns, *vec is unmodified)
|
* (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 TransInfo;
|
||||||
struct ScrArea;
|
struct ScrArea;
|
||||||
|
@ -304,7 +304,7 @@ static void viewops_data_create(bContext *C, wmOperator *op, wmEvent *event)
|
|||||||
if (vod->use_dyn_ofs) {
|
if (vod->use_dyn_ofs) {
|
||||||
VECCOPY(vod->ofs, rv3d->ofs);
|
VECCOPY(vod->ofs, rv3d->ofs);
|
||||||
/* If there's no selection, lastofs is unmodified and last value since static */
|
/* 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);
|
VECCOPY(vod->dyn_ofs, lastofs);
|
||||||
mul_v3_fl(vod->dyn_ofs, -1.0f);
|
mul_v3_fl(vod->dyn_ofs, -1.0f);
|
||||||
}
|
}
|
||||||
|
@ -1100,7 +1100,7 @@ int transformEvent(TransInfo *t, wmEvent *event)
|
|||||||
return OPERATOR_PASS_THROUGH;
|
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");
|
TransInfo *t = MEM_callocN(sizeof(TransInfo), "TransInfo data");
|
||||||
int success = 1;
|
int success = 1;
|
||||||
@ -1111,9 +1111,9 @@ int calculateTransformCenter(bContext *C, wmEvent *event, int centerMode, float
|
|||||||
|
|
||||||
t->mode = TFM_DUMMY;
|
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
|
t->around = centerMode; // override userdefined mode
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user