From 89317afbdfe19da951aeb2fa7764cc2f60b39f4d Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Mon, 12 Nov 2007 04:17:03 +0000 Subject: 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. --- source/blender/src/editipo_lib.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/src/editipo_lib.c') diff --git a/source/blender/src/editipo_lib.c b/source/blender/src/editipo_lib.c index f10e100df7d..6ef45f32620 100644 --- a/source/blender/src/editipo_lib.c +++ b/source/blender/src/editipo_lib.c @@ -61,7 +61,7 @@ char *ob_ic_names[OB_TOTNAM] = { "LocX", "LocY", "LocZ", "dLocX", "dLocY", "dLoc "Layer", "Time", "ColR", "ColG", "ColB", "ColA", "FStreng", "FFall", "RDamp", "Damping", "Perm" }; -char *co_ic_names[CO_TOTNAM] = { "Inf" }; +char *co_ic_names[CO_TOTNAM] = { "Inf", "HeadTail" }; char *mtex_ic_names[TEX_TOTNAM] = { "OfsX", "OfsY", "OfsZ", "SizeX", "SizeY", "SizeZ", "texR", "texG", "texB", "DefVar", "Col", "Nor", "Var", "Disp" }; @@ -191,6 +191,7 @@ char *getname_co_ei(int nr) { switch(nr){ case CO_ENFORCE: + case CO_HEADTAIL: return co_ic_names[nr-1]; } return ic_name_empty[0]; @@ -388,3 +389,5 @@ int texchannel_to_adrcode(int channel) } + + -- cgit v1.2.3