Removing some useless code, and fixed a few compiler warnings.
This commit is contained in:
@@ -2547,24 +2547,13 @@ static void evaluate_constraint (bConstraint *constraint, float ownermat[][4], f
|
||||
/* obtain target effect */
|
||||
switch (data->from) {
|
||||
case 2: /* scale */
|
||||
{
|
||||
Mat4ToSize(targetmat, dvec);
|
||||
}
|
||||
break;
|
||||
case 1: /* rotation */
|
||||
{
|
||||
/* copy, and reduce to smallest rotation distance */
|
||||
Mat4ToEul(targetmat, dvec);
|
||||
|
||||
/* reduce rotation */
|
||||
for (i=0; i<3; i++)
|
||||
dvec[i]= fmod(dvec[i], M_PI*2);
|
||||
}
|
||||
break;
|
||||
default: /* location */
|
||||
{
|
||||
VECCOPY(dvec, targetmat[3]);
|
||||
}
|
||||
VecCopyf(dvec, targetmat[3]);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -3305,7 +3305,7 @@ int point_in_tri_prism(float p[3], float v1[3], float v2[3], float v3[3])
|
||||
/* point closest to v1 on line v2-v3 in 3D */
|
||||
void PclosestVL3Dfl(float *closest, float *v1, float *v2, float *v3)
|
||||
{
|
||||
float lambda, cp[3], len;
|
||||
float lambda, cp[3];
|
||||
|
||||
lambda= lambda_cp_line_ex(v1, v2, v3, cp);
|
||||
|
||||
|
||||
@@ -440,7 +440,9 @@ static PyObject *Constraint_insertKey( BPy_Constraint * self, PyObject * value )
|
||||
|
||||
/******************************************************************************/
|
||||
/* Constraint Space Conversion get/set procedures */
|
||||
/* - Individual constraint procedures should call these */
|
||||
/* - These are called before/instead of individual constraint */
|
||||
/* get/set procedures when OWNERSPACE or TARGETSPACE are chosen */
|
||||
/* - They are only called from Constraint_g/setData
|
||||
/******************************************************************************/
|
||||
|
||||
static PyObject *constspace_getter( BPy_Constraint * self, int type )
|
||||
@@ -528,7 +530,7 @@ static int constspace_setter( BPy_Constraint *self, int type, PyObject *value )
|
||||
case CONSTRAINT_TYPE_TRANSFORM:
|
||||
{
|
||||
Object *tar;
|
||||
char subtarget[32];
|
||||
char *subtarget;
|
||||
|
||||
tar= get_constraint_target(con, &subtarget);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user