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:
authorMartin Poirier <theeth@yahoo.com>2007-04-06 23:42:46 +0400
committerMartin Poirier <theeth@yahoo.com>2007-04-06 23:42:46 +0400
commitf42bc12285388e6fb93cba1223f90dcb7dcf5373 (patch)
treefb1d14d458489245de698bf09c86544294f57123 /source/blender/python/api2_2x/Constraint.c
parent3f07ca5954c3343f88b418cb56c4c57f0c20b285 (diff)
=== BPY ===
Adding Python counterparts to the Invert params for Copy Rot and Copy Loc. I had to align the constants being used, so if you had files using those options (introduced after 2.43), you'll have to modify the INVERT settings for ROTLIKE constraints (didn't feel like making a minor version bump for this, if people thing otherwise, please say so). Based on a patch by Juho Vepsäläinen (bebraw)
Diffstat (limited to 'source/blender/python/api2_2x/Constraint.c')
-rw-r--r--source/blender/python/api2_2x/Constraint.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/python/api2_2x/Constraint.c b/source/blender/python/api2_2x/Constraint.c
index 1fb202be6af..602ef7a396b 100644
--- a/source/blender/python/api2_2x/Constraint.c
+++ b/source/blender/python/api2_2x/Constraint.c
@@ -876,7 +876,7 @@ static int locatelike_setter( BPy_Constraint *self, int type, PyObject *value )
}
case EXPP_CONSTR_COPY:
return EXPP_setIValueRange( value, &con->flag,
- 0, LOCLIKE_X | LOCLIKE_Y | LOCLIKE_Z, 'i' );
+ 0, LOCLIKE_X | LOCLIKE_Y | LOCLIKE_Z | LOCLIKE_X_INVERT | LOCLIKE_Y_INVERT | LOCLIKE_Z_INVERT, 'i' );
case EXPP_CONSTR_LOCAL:
if( !get_armature( con->tar ) )
return EXPP_ReturnIntError( PyExc_RuntimeError,
@@ -934,7 +934,7 @@ static int rotatelike_setter( BPy_Constraint *self, int type, PyObject *value )
}
case EXPP_CONSTR_COPY:
return EXPP_setIValueRange( value, &con->flag,
- 0, LOCLIKE_X | LOCLIKE_Y | LOCLIKE_Z, 'i' );
+ 0, LOCLIKE_X | LOCLIKE_Y | LOCLIKE_Z | LOCLIKE_X_INVERT | LOCLIKE_Y_INVERT | LOCLIKE_Z_INVERT, 'i' );
case EXPP_CONSTR_LOCAL:
if( !get_armature( con->tar ) )
return EXPP_ReturnIntError( PyExc_RuntimeError,
@@ -994,7 +994,7 @@ static int sizelike_setter( BPy_Constraint *self, int type, PyObject *value )
}
case EXPP_CONSTR_COPY:
return EXPP_setIValueRange( value, &con->flag,
- 0, LOCLIKE_X | LOCLIKE_Y | LOCLIKE_Z, 'i' );
+ 0, LOCLIKE_X | LOCLIKE_Y | LOCLIKE_Z | LOCLIKE_X_INVERT | LOCLIKE_Y_INVERT | LOCLIKE_Z_INVERT, 'i' );
#if 0
case EXPP_CONSTR_LOCAL:
if( !get_armature( con->tar ) )
@@ -1957,6 +1957,12 @@ static PyObject *M_Constraint_SettingsDict( void )
PyInt_FromLong( LOCLIKE_Y ) );
PyConstant_Insert( d, "COPYZ",
PyInt_FromLong( LOCLIKE_Z ) );
+ PyConstant_Insert( d, "COPYXINVERT",
+ PyInt_FromLong( LOCLIKE_X_INVERT ) );
+ PyConstant_Insert( d, "COPYYINVERT",
+ PyInt_FromLong( LOCLIKE_Y_INVERT ) );
+ PyConstant_Insert( d, "COPYZINVERT",
+ PyInt_FromLong( LOCLIKE_Z_INVERT ) );
PyConstant_Insert( d, "TARGET",
PyInt_FromLong( EXPP_CONSTR_TARGET ) );