#define CONSTRAINT_CHANNEL_SELECT 0x01
#define CONSTRAINT_CHANNEL_PROTECTED 0x02
+/**
+ * The flags for ROTLIKE, LOCLIKE and SIZELIKE should be kept identical
+ * (that is, same effect, different name). It simplifies the Python API access a lot.
+ */
+
/* bRotateLikeConstraint.flag */
#define ROTLIKE_X 0x01
#define ROTLIKE_Y 0x02
#define ROTLIKE_Z 0x04
-#define ROTLIKE_X_INVERT 0x08
-#define ROTLIKE_Y_INVERT 0x10
-#define ROTLIKE_Z_INVERT 0x20
-#define ROTLIKE_OFFSET 0x40
+#define ROTLIKE_X_INVERT 0x10
+#define ROTLIKE_Y_INVERT 0x20
+#define ROTLIKE_Z_INVERT 0x40
+#define ROTLIKE_OFFSET 0x80
/* bLocateLikeConstraint.flag */
#define LOCLIKE_X 0x01
#define SIZELIKE_X 0x01
#define SIZELIKE_Y 0x02
#define SIZELIKE_Z 0x04
-#define SIZELIKE_OFFSET 0x08
+#define SIZELIKE_OFFSET 0x80
/* Axis flags */
#define LOCK_X 0x00
}
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,
}
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,
}
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 ) )
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 ) );
- OFFSET (float): clamped to [-100.0,100.0]
- STICKY (bool)
- Used by Copy Location (COPYLOC) and Copy Rotation (COPYROT)
- - COPY (bitfield): any combination of COPYX, COPYY and COPYZ
+ - COPY (bitfield): any combination of COPYX, COPYY and COPYZ with possible addition of COPYXINVERT, COPYYINVERT and COPYZINVERT to invert that particular input (if on).
- LOCAL (bool): Only for constraints which Armature targets.
- Used by Copy Size (COPYSIZE) constraint:
- COPY (bitfield): any combination of COPYX, COPYY and COPYZ