diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-11-12 07:17:03 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-11-12 07:17:03 +0300 |
commit | 89317afbdfe19da951aeb2fa7764cc2f60b39f4d (patch) | |
tree | 4b8b0410ba9ab4c724d24be43a6882725ed972fb /source/blender/makesdna/DNA_constraint_types.h | |
parent | 7f2e43968a917e4512117164a8645756893c93da (diff) |
Patch #7767: Constraint Subtargets can now target anywhere on a bone, not just the head or tail
Patch by: Roland Hess (harkyman)
For example, a constraint can be sub-targeted at the 50% (or 31.2% or 85% etc.) point of its target bone, giving you enormous rigging flexibility and removing the need for complex contraptions to do such things as:
- A bone whose base slides only between to points on a rig (CopyLoc with a variable, animated subtarget point)
- Bones that attach to multiple points along another bone (CopyLocs, each with a different head/tail percentage)
- Bones that need to stretch to a point midway between specific spots on two other bones (old way: too crazy to mention; new way: stretch bone between points on end bones, then another stretch to the midpoint of the first stretch)
It is only used for the constraint types for which it is relevant: CopyLoc, TrackTo, StretchTo and MinMax, TrackTo, and Floor.
Notes:
- This is accessed by the Head/Tail number-slider.
- This value can be animated per constraint
- The old "Copy Bone Tail" option for the CopyLoc constraint has been automatically converted to 1.0 Head/Bone values for the affected constraints
- In the code, this value is in the bConstraint struct, so it is available for all constraints, even though only a few implement it.
Diffstat (limited to 'source/blender/makesdna/DNA_constraint_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_constraint_types.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h index 431ef56e1c4..bf512c3faf8 100644 --- a/source/blender/makesdna/DNA_constraint_types.h +++ b/source/blender/makesdna/DNA_constraint_types.h @@ -64,6 +64,8 @@ typedef struct bConstraint { char name[30]; /* Constraint name */ float enforce; /* Amount of influence exherted by constraint (0.0-1.0) */ + float headtail; /* Point along subtarget bone where the actual target is. 0=head (default for all), 1=tail*/ + int pad; } bConstraint; @@ -116,7 +118,7 @@ typedef struct bPythonConstraint { char subtarget[32]; /* subtarger from previous implentation (version-patch sets this to "" on file-load) */ } bPythonConstraint; -/* Single-target subobject constraints --------------------- */ + /* Inverse-Kinematics (IK) constraint */ typedef struct bKinematicConstraint { Object *tar; @@ -134,6 +136,8 @@ typedef struct bKinematicConstraint { float grabtarget[3]; /* for target-less IK */ } bKinematicConstraint; + +/* Single-target subobject constraints --------------------- */ /* Track To Constraint */ typedef struct bTrackToConstraint { Object *tar; @@ -386,6 +390,7 @@ typedef enum B_CONSTRAINTCHANNEL_FLAG { #define LOCLIKE_X 0x01 #define LOCLIKE_Y 0x02 #define LOCLIKE_Z 0x04 + /* LOCLIKE_TIP is a depreceated option... use headtail=1.0f instead */ #define LOCLIKE_TIP 0x08 #define LOCLIKE_X_INVERT 0x10 #define LOCLIKE_Y_INVERT 0x20 |