remove some redundant checks and compiler warnings.
This commit is contained in:
@@ -2611,8 +2611,8 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
|
|||||||
copy_v3_v3(center, td->center);
|
copy_v3_v3(center, td->center);
|
||||||
}
|
}
|
||||||
else if (t->flag & T_EDIT) {
|
else if (t->flag & T_EDIT) {
|
||||||
|
|
||||||
if(t->around==V3D_LOCAL && (t->settings->selectmode & SCE_SELECT_FACE)) {
|
if(t->settings->selectmode & SCE_SELECT_FACE) {
|
||||||
copy_v3_v3(center, td->center);
|
copy_v3_v3(center, td->center);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -2899,19 +2899,17 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
|
|||||||
float vec[3], totmat[3][3], smat[3][3];
|
float vec[3], totmat[3][3], smat[3][3];
|
||||||
float eul[3], fmat[3][3], quat[4];
|
float eul[3], fmat[3][3], quat[4];
|
||||||
float *center = t->center;
|
float *center = t->center;
|
||||||
|
|
||||||
/* local constraint shouldn't alter center */
|
/* local constraint shouldn't alter center */
|
||||||
if (around == V3D_LOCAL) {
|
if (around == V3D_LOCAL) {
|
||||||
if (t->flag & (T_OBJECT|T_POSE)) {
|
if (t->flag & (T_OBJECT|T_POSE)) {
|
||||||
center = td->center;
|
center = td->center;
|
||||||
}
|
}
|
||||||
else {
|
else if (t->settings->selectmode & SCE_SELECT_FACE) {
|
||||||
if(around==V3D_LOCAL && (t->settings->selectmode & SCE_SELECT_FACE)) {
|
center = td->center;
|
||||||
center = td->center;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t->flag & T_POINTS) {
|
if (t->flag & T_POINTS) {
|
||||||
mul_m3_m3m3(totmat, mat, td->mtx);
|
mul_m3_m3m3(totmat, mat, td->mtx);
|
||||||
mul_m3_m3m3(smat, td->smtx, totmat);
|
mul_m3_m3m3(smat, td->smtx, totmat);
|
||||||
|
|||||||
@@ -94,11 +94,12 @@ int mathutils_array_parse(float *array, int array_min, int array_max, PyObject *
|
|||||||
#if 1 /* approx 6x speedup for mathutils types */
|
#if 1 /* approx 6x speedup for mathutils types */
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
if( (VectorObject_Check(value) && (size= ((VectorObject *)value)->size)) ||
|
if( (size= VectorObject_Check(value) ? ((VectorObject *)value)->size : 0) ||
|
||||||
(EulerObject_Check(value) && (size= 3)) ||
|
(size= EulerObject_Check(value) ? 3 : 0) ||
|
||||||
(QuaternionObject_Check(value) && (size= 4)) ||
|
(size= QuaternionObject_Check(value) ? 4 : 0) ||
|
||||||
(ColorObject_Check(value) && (size= 3))
|
(size= ColorObject_Check(value) ? 3 : 0))
|
||||||
) {
|
{
|
||||||
|
printf("siez %d\n", size);
|
||||||
if(BaseMath_ReadCallback((BaseMathObject *)value) == -1) {
|
if(BaseMath_ReadCallback((BaseMathObject *)value) == -1) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user