Revert "Cleanup: remove unused argument"
This reverts commit 780857f8e8.
The `axismtx` argument was supposed to be used.
This commit is contained in:
@@ -537,7 +537,10 @@ static void applyObjectConstraintSize(TransInfo *t,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void constraints_rotation_imp(TransInfo *t, float r_vec[3], float *r_angle)
|
static void constraints_rotation_imp(TransInfo *t,
|
||||||
|
float axismtx[3][3],
|
||||||
|
float r_vec[3],
|
||||||
|
float *r_angle)
|
||||||
{
|
{
|
||||||
BLI_assert(t->con.mode & CON_APPLY);
|
BLI_assert(t->con.mode & CON_APPLY);
|
||||||
int mode = t->con.mode & (CON_AXIS0 | CON_AXIS1 | CON_AXIS2);
|
int mode = t->con.mode & (CON_AXIS0 | CON_AXIS1 | CON_AXIS2);
|
||||||
@@ -581,7 +584,7 @@ static void applyAxisConstraintRot(
|
|||||||
TransInfo *t, TransDataContainer *UNUSED(tc), TransData *td, float vec[3], float *angle)
|
TransInfo *t, TransDataContainer *UNUSED(tc), TransData *td, float vec[3], float *angle)
|
||||||
{
|
{
|
||||||
if (!td && t->con.mode & CON_APPLY) {
|
if (!td && t->con.mode & CON_APPLY) {
|
||||||
constraints_rotation_imp(t, vec, angle);
|
constraints_rotation_imp(t, t->spacemtx, vec, angle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -602,13 +605,25 @@ static void applyObjectConstraintRot(
|
|||||||
TransInfo *t, TransDataContainer *tc, TransData *td, float vec[3], float *angle)
|
TransInfo *t, TransDataContainer *tc, TransData *td, float vec[3], float *angle)
|
||||||
{
|
{
|
||||||
if (t->con.mode & CON_APPLY) {
|
if (t->con.mode & CON_APPLY) {
|
||||||
|
float tmp_axismtx[3][3];
|
||||||
|
float(*axismtx)[3];
|
||||||
|
|
||||||
/* on setup call, use first object */
|
/* on setup call, use first object */
|
||||||
if (td == NULL) {
|
if (td == NULL) {
|
||||||
BLI_assert(tc == NULL);
|
BLI_assert(tc == NULL);
|
||||||
tc = TRANS_DATA_CONTAINER_FIRST_OK(t);
|
tc = TRANS_DATA_CONTAINER_FIRST_OK(t);
|
||||||
td = tc->data;
|
td = tc->data;
|
||||||
}
|
}
|
||||||
constraints_rotation_imp(t, vec, angle);
|
|
||||||
|
if (t->flag & T_EDIT) {
|
||||||
|
mul_m3_m3m3(tmp_axismtx, tc->mat3_unit, td->axismtx);
|
||||||
|
axismtx = tmp_axismtx;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
axismtx = td->axismtx;
|
||||||
|
}
|
||||||
|
|
||||||
|
constraints_rotation_imp(t, axismtx, vec, angle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user