== Transformation Constraint ==

This commit adds a new constraint to Blender: the Transformation Constraint. This constraint gives you more freedom to choose how transforms are copied from one object/bone to another object/bone. 

You can assign the Loc/Rot/Scale channels of a source to the Loc/Rot/Scale channels of a destination, specifying the range of motion (per axis) from the source to consider, and the range of motion (per axis) that will be applied to the destination. Also, for each destination axis, you can choose which of the source axes to copy from. 

A similar constraint was coded by Jason Blary (snark), as Patch #4991. This constraint is basically rewritten from scratch, although there are some elements of the original patch which may be borrowed in future.

Various notes:
* PyAPI access has been coded. 
* Space conversion is also enabled for this constraint.
* Also the useless get_constraint_col function has been removed
* Doing a rotation copy with a ratio that is not 1:1 doesn't always work correctly yet (like for the Copy Rotation constraint).
This commit is contained in:
Joshua Leung
2007-07-21 07:26:15 +00:00
parent c924fc542b
commit 74ca178199
9 changed files with 613 additions and 104 deletions

View File

@@ -32,7 +32,7 @@ Or to print all the constraints attached to each bone in a pose::
for comparison with L{Constraint.type}. Values are
TRACKTO, IKSOLVER, FOLLOWPATH, COPYROT, COPYLOC, COPYSIZE, ACTION,
LOCKTRACK, STRETCHTO, FLOOR, LIMITLOC, LIMITROT, LIMITSIZE, CLAMPTO,
PYTHON, CHILDOF, NULL
PYTHON, CHILDOF, TRANSFORM, NULL
@type Settings: readonly dictionary
@var Settings: Constant dict used for changing constraint settings.
@@ -120,6 +120,20 @@ Or to print all the constraints attached to each bone in a pose::
- Used by Child Of (CHILDOF) constraint:
- COPY (bitfield): any combination of PARLOCX, PARLOCY, PARLOCZ,
PARROTX, PARROTY, PARROTZ, PARSIZEX, PARSIZEY, PARSIZEZ.
- Used by Transformation (TRANSFORM) constraint:
- FROM (int): values are LOC, ROT, SCALE
- TO (int): values are LOC, ROT, SCALE
- MAPX, MAPY, MAPZ (int): values are LOC, ROT, SCALE
- EXTRAPOLATE (bool)
- FROM_MINX, FROM_MINY, FROM_MINZ, FROM_MAXX,
FROM_MAXY, FROM_MAXZ (float):
If FROM==LOC, then is clamped to [-1000.0, 1000.0]
If FROM==ROT, then is clamped to [-360.0, 360.0]
If FROM==SCALE, then is clamped to [0.0001, 1000.0]
- TO_MINX, TO_MINY, TO_MINZ, TO_MAXX, TO_MAXY, TO_MAXZ (float):
If TO==LOC, then is clamped to [-1000.0, 1000.0]
If TO==ROT, then is clamped to [-360.0, 360.0]
If TO==SCALE, then is clamped to [0.0001, 1000.0]
"""