Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2006-11-07 02:51:37 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2006-11-07 02:51:37 +0300
commitb48c514db87d360ddfcadfcde582c0cae9344d6c (patch)
treeedd7df52b4211a4a8053733d43d49ea1b2aae915 /source/blender/python/api2_2x/Constraint.c
parent10a4b1ad8ba1aeb951be173e8f5415f8b75e329e (diff)
Added an option in the IK constraint to disable stretching, useful
in rigs with layered IK constraints. Also removed the tolerance setting, this value wasn't used in the solver anymore.
Diffstat (limited to 'source/blender/python/api2_2x/Constraint.c')
-rw-r--r--source/blender/python/api2_2x/Constraint.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/python/api2_2x/Constraint.c b/source/blender/python/api2_2x/Constraint.c
index 2657ed51a72..e8a0566c89e 100644
--- a/source/blender/python/api2_2x/Constraint.c
+++ b/source/blender/python/api2_2x/Constraint.c
@@ -67,7 +67,7 @@ enum constraint_constants {
EXPP_CONSTR_MINZ = TRACK_nZ,
EXPP_CONSTR_TARGET = 100,
- EXPP_CONSTR_TOLERANCE,
+ EXPP_CONSTR_STRETCH,
EXPP_CONSTR_ITERATIONS,
EXPP_CONSTR_BONE,
EXPP_CONSTR_CHAINLEN,
@@ -390,8 +390,8 @@ static PyObject *kinematic_getter( BPy_Constraint * self, int type )
return Object_CreatePyObject( con->tar );
case EXPP_CONSTR_BONE:
return PyString_FromString( con->subtarget );
- case EXPP_CONSTR_TOLERANCE:
- return PyFloat_FromDouble( (double)con->tolerance );
+ case EXPP_CONSTR_STRETCH:
+ return PyBool_FromLong( (long)( con->flag & CONSTRAINT_IK_STRETCH ) ) ;
case EXPP_CONSTR_ITERATIONS:
return PyInt_FromLong( (long)con->iterations );
case EXPP_CONSTR_CHAINLEN:
@@ -432,8 +432,8 @@ static int kinematic_setter( BPy_Constraint *self, int type, PyObject *value )
return 0;
}
- case EXPP_CONSTR_TOLERANCE:
- return EXPP_setFloatClamped( value, &con->tolerance, 0.0001, 1.0 );
+ case EXPP_CONSTR_STRETCH:
+ return EXPP_setBitfield( value, &con->flag, CONSTRAINT_IK_STRETCH, 'h' );
case EXPP_CONSTR_ITERATIONS:
return EXPP_setIValueClamped( value, &con->iterations, 1, 10000, 'h' );
case EXPP_CONSTR_CHAINLEN:
@@ -1829,8 +1829,8 @@ static PyObject *M_Constraint_SettingsDict( void )
PyConstant_Insert( d, "TARGET",
PyInt_FromLong( EXPP_CONSTR_TARGET ) );
- PyConstant_Insert( d, "TOLERANCE",
- PyInt_FromLong( EXPP_CONSTR_TOLERANCE ) );
+ PyConstant_Insert( d, "STRETCH",
+ PyInt_FromLong( EXPP_CONSTR_STRETCH ) );
PyConstant_Insert( d, "ITERATIONS",
PyInt_FromLong( EXPP_CONSTR_ITERATIONS ) );
PyConstant_Insert( d, "BONE",