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:
Diffstat (limited to 'source/blender/python/api2_2x/Constraint.c')
-rw-r--r--source/blender/python/api2_2x/Constraint.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Constraint.c b/source/blender/python/api2_2x/Constraint.c
index 0e235082c61..4dddd274a0e 100644
--- a/source/blender/python/api2_2x/Constraint.c
+++ b/source/blender/python/api2_2x/Constraint.c
@@ -125,6 +125,8 @@ enum constraint_constants {
EXPP_CONSTR_LIMYROT = LIMIT_YROT,
EXPP_CONSTR_LIMZROT = LIMIT_ZROT,
+ EXPP_CONSTR_CLAMPCYCLIC,
+
EXPP_CONSTR_XMIN,
EXPP_CONSTR_XMAX,
EXPP_CONSTR_YMIN,
@@ -887,6 +889,8 @@ static PyObject *clampto_getter( BPy_Constraint * self, int type )
return Object_CreatePyObject( con->tar );
case EXPP_CONSTR_CLAMP:
return PyInt_FromLong( (long)con->flag );
+ case EXPP_CONSTR_CLAMPCYCLIC:
+ return PyBool_FromLong( (long)(con->flag2 & CLAMPTO_CYCLIC) );
default:
return EXPP_ReturnPyObjError( PyExc_KeyError, "key not found" );
}
@@ -908,6 +912,8 @@ static int clampto_setter( BPy_Constraint *self, int type, PyObject *value )
case EXPP_CONSTR_CLAMP:
return EXPP_setIValueRange( value, &con->flag,
CLAMPTO_AUTO, CLAMPTO_Z, 'i' );
+ case EXPP_CONSTR_CLAMPCYCLIC:
+ return EXPP_setBitfield( value, &con->flag2, CLAMPTO_CYCLIC, 'i' );
default:
return EXPP_ReturnIntError( PyExc_KeyError, "key not found" );
}
@@ -2418,6 +2424,8 @@ static PyObject *M_Constraint_SettingsDict( void )
PyInt_FromLong( CLAMPTO_Y ) );
PyConstant_Insert( d, "CLAMPZ",
PyInt_FromLong( CLAMPTO_Z ) );
+ PyConstant_Insert( d, "CLAMPCYCLIC",
+ PyInt_FromLong( EXPP_CONSTR_CLAMPCYCLIC ));
PyConstant_Insert( d, "TARGET",
PyInt_FromLong( EXPP_CONSTR_TARGET ) );