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:
authorRoland Hess <me@harkyman.com>2010-03-16 15:55:56 +0300
committerRoland Hess <me@harkyman.com>2010-03-16 15:55:56 +0300
commitd617294c49912b1b0473bbbe58f62a3549641482 (patch)
treebbbb6645fb501d566047a43a0222137aacd50f93 /source/blender/makesdna
parent1cf95d2494ab82af61153abc3c45fa1a4fd3a4ed (diff)
New "Maintain Volume" constraint. When attached to a bone, you specify a "free" axis. Upon scaling, this free axis scales normally, but the constraint forces the other two axes to adjust themselves appropriately so that overall bone volume is maintained. So, setting "Y" as the free axis (the default) creates a bone that automatically squashes and stretches when scaling. Thanks to Aligorith, Fweeb, Cessen and others for the feedback.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index 6e837588f0c..358cbb6e34c 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -208,6 +208,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;
@@ -412,6 +418,7 @@ 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 */
/* NOTE: no constraints are allowed to be added after this */
NUM_CONSTRAINT_TYPES
@@ -499,6 +506,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,