diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-07-30 15:10:30 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-07-30 15:10:30 +0400 |
commit | 655fb548aa68b4b8fd06c859d1015105ca7259bc (patch) | |
tree | a1a1ff91b6c0c7c80f7b467b7a4e40619fd75ffe | |
parent | 8b127a9bc1824746d6f70665a792f7d66b09e6fa (diff) |
Removing some useless code, and fixed a few compiler warnings.
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 13 | ||||
-rw-r--r-- | source/blender/blenlib/intern/arithb.c | 2 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Constraint.c | 6 |
3 files changed, 6 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 55470d0117c..2981d158a24 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -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; } diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c index f403be6cd92..387e2227797 100644 --- a/source/blender/blenlib/intern/arithb.c +++ b/source/blender/blenlib/intern/arithb.c @@ -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); diff --git a/source/blender/python/api2_2x/Constraint.c b/source/blender/python/api2_2x/Constraint.c index 6c0633c4c04..1f9a7e953be 100644 --- a/source/blender/python/api2_2x/Constraint.c +++ b/source/blender/python/api2_2x/Constraint.c @@ -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); |