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/makesdna/DNA_constraint_types.h')
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h70
1 files changed, 64 insertions, 6 deletions
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index 6e837588f0c..f310e5e55e0 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -174,6 +174,7 @@ typedef struct bSplineIKConstraint {
/* Single-target subobject constraints --------------------- */
+
/* Track To Constraint */
typedef struct bTrackToConstraint {
Object *tar;
@@ -208,6 +209,12 @@ typedef struct bSizeLikeConstraint {
char subtarget[32];
} bSizeLikeConstraint;
+/* Maintain Volume Constraint */
+typedef struct bSameVolumeConstraint {
+ int flag;
+ float volume;
+} bSameVolumeConstraint;
+
/* Copy Transform Constraint */
typedef struct bTransLikeConstraint {
Object *tar;
@@ -330,6 +337,24 @@ typedef struct bTransformConstraint {
float to_max[3];
} bTransformConstraint;
+/* Pivot Constraint */
+typedef struct bPivotConstraint {
+ /* Pivot Point:
+ * Either target object + offset, or just offset is used
+ */
+ Object *tar; /* target object (optional) */
+ char subtarget[32]; /* subtarget name (optional) */
+ float offset[3]; /* offset from the target to use, regardless of whether it exists */
+
+ /* Rotation-driven activation:
+ * This option provides easier one-stop setups for footrolls
+ */
+ short rotAxis; /* rotation axes to consider for this (ePivotConstraint_Axis) */
+
+ /* General flags */
+ short flag; /* ePivotConstraint_Flag */
+} bPivotConstraint;
+
/* transform limiting constraints - zero target ---------------------------- */
/* Limit Location Constraint */
typedef struct bLocLimitConstraint {
@@ -412,6 +437,8 @@ typedef enum eBConstraint_Types {
CONSTRAINT_TYPE_DAMPTRACK, /* New Tracking constraint that minimises twisting */
CONSTRAINT_TYPE_SPLINEIK, /* Spline-IK - Align 'n' bones to a curve */
CONSTRAINT_TYPE_TRANSLIKE, /* Copy transform matrix */
+ CONSTRAINT_TYPE_SAMEVOL, /* Maintain volume during scaling */
+ CONSTRAINT_TYPE_PIVOT, /* Pivot Constraint */
/* NOTE: no constraints are allowed to be added after this */
NUM_CONSTRAINT_TYPES
@@ -447,7 +474,7 @@ typedef enum eBConstraint_SpaceTypes {
CONSTRAINT_SPACE_LOCAL, /* = 1 */
/* for posechannels - pose space */
CONSTRAINT_SPACE_POSE, /* = 2 */
- /* for posechannels - local with parent */
+ /* for posechannels - local with parent */
CONSTRAINT_SPACE_PARLOCAL, /* = 3 */
/* for files from between 2.43-2.46 (should have been parlocal) */
CONSTRAINT_SPACE_INVALID, /* = 4. do not exchange for anything! */
@@ -462,11 +489,6 @@ typedef enum eConstraintChannel_Flags {
/* -------------------------------------- */
-/**
- * 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 */
typedef enum eCopyRotation_Flags {
ROTLIKE_X = (1<<0),
@@ -499,6 +521,13 @@ typedef enum eCopyScale_Flags {
SIZELIKE_OFFSET = (1<<3),
} eCopyScale_Flags;
+/* bSameVolumeConstraint.flag */
+typedef enum eSameVolume_Modes {
+ SAMEVOL_X = 0,
+ SAMEVOL_Y,
+ SAMEVOL_Z,
+} eSameVolume_Modes;
+
/* Locked-Axis Values (Locked Track) */
typedef enum eLockAxis_Modes {
LOCK_X = 0,
@@ -674,6 +703,35 @@ typedef enum eChildOf_Flags {
CHILDOF_SIZEZ = (1<<8),
} eChildOf_Flags;
+/* Pivot Constraint */
+ /* Restrictions for Pivot Constraint axis to consider for enabling constraint */
+typedef enum ePivotConstraint_Axis {
+ /* do not consider this activity-clamping */
+ PIVOTCON_AXIS_NONE = -1,
+
+ /* consider -ve x-axis rotations */
+ PIVOTCON_AXIS_X_NEG,
+ /* consider -ve y-axis rotations */
+ PIVOTCON_AXIS_Y_NEG,
+ /* consider -ve z-axis rotations */
+ PIVOTCON_AXIS_Z_NEG,
+
+ /* consider +ve x-axis rotations */
+ PIVOTCON_AXIS_X,
+ /* consider +ve y-axis rotations */
+ PIVOTCON_AXIS_Y,
+ /* consider +ve z-axis rotations */
+ PIVOTCON_AXIS_Z,
+} ePivotConstraint_Axis;
+
+ /* settings for Pivot Constraint in general */
+typedef enum ePivotConstraint_Flag {
+ /* offset is to be interpreted as being a fixed-point in space */
+ PIVOTCON_FLAG_OFFSET_ABS = (1<<0),
+ /* rotation-based activation uses negative rotation to drive result */
+ PIVOTCON_FLAG_ROTACT_NEG = (1<<1),
+} ePivotConstraint_Flag;
+
/* Rigid-Body Constraint */
#define CONSTRAINT_DRAW_PIVOT 0x40
#define CONSTRAINT_DISABLE_LINKED_COLLISION 0x80