diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-04-15 20:25:41 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-04-16 18:41:57 +0300 |
commit | ad9275ed4e60b7ca4874bbb2c80fef6e2606eb39 (patch) | |
tree | 901785b1d79494754a4d96450ce13a093a74ab95 /source/blender/makesdna/DNA_constraint_types.h | |
parent | 752edc0a155a3cd9ff6b0152cd7c96cecd542c9b (diff) |
Spline IK: support changing individual bone length via Y scaling.
Previously Spline IK provided only two choices: either scale the
length of the bone chain to fit the length of the curve, or don't
scale the bone in the Y dimension at all (ignoring effects of
actually fitting to the curve due to curvature and curve object
scale).
This patch adds a new option to use the pre-IK Y scale of the
bones to adjust their length when fitted to the curve, allowing
individual posing control over the length of the segments.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4687
Diffstat (limited to 'source/blender/makesdna/DNA_constraint_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_constraint_types.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index a7e44bea149..9dbebee5c89 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -231,6 +231,9 @@ typedef struct bSplineIKConstraint { short flag; /** Method used for determining the x & z scaling of the bones. */ short xzScaleMode; + /** Method used for determining the y scaling of the bones. */ + short yScaleMode; + short _pad[3]; /* volume preservation settings */ float bulge; @@ -879,8 +882,10 @@ typedef enum eSplineIK_Flags { CONSTRAINT_SPLINEIK_BOUND = (1 << 0), /* root of chain is not influenced by the constraint */ CONSTRAINT_SPLINEIK_NO_ROOT = (1 << 1), +#ifdef DNA_DEPRECATED /* bones in the chain should not scale to fit the curve */ CONSTRAINT_SPLINEIK_SCALE_LIMITED = (1 << 2), +#endif /* evenly distribute the bones along the path regardless of length */ CONSTRAINT_SPLINEIK_EVENSPLITS = (1 << 3), /* don't adjust the x and z scaling of the bones by the curve radius */ @@ -903,6 +908,16 @@ typedef enum eSplineIK_XZScaleModes { CONSTRAINT_SPLINEIK_XZS_VOLUMETRIC = 3, } eSplineIK_XZScaleModes; +/* bSplineIKConstraint->yScaleMode */ +typedef enum eSplineIK_YScaleModes { + /* no y scaling */ + CONSTRAINT_SPLINEIK_YS_NONE = 0, + /* bones in the chain should be scaled to fit the length of the curve */ + CONSTRAINT_SPLINEIK_YS_FIT_CURVE = 1, + /* bones in the chain should take their y scales from the original scaling */ + CONSTRAINT_SPLINEIK_YS_ORIGINAL = 2, +} eSplineIK_YScaleModes; + /* bArmatureConstraint -> flag */ typedef enum eArmature_Flags { /** use dual quaternion blending */ |