=== [ #5094 ] TrackTo Constraint with an animatable "up" direction ===

Patch by Matthew Plough: This adds an option to the Track To constraint to use the target's Z axis for Up axis reference instead of the global Z axis.

Off by default for backward compat.
This commit is contained in:
2006-12-03 18:38:51 +00:00
parent 953cd28b67
commit 4a2eceff20
3 changed files with 101 additions and 2 deletions

View File

@@ -816,6 +816,12 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
strcpy (data->subtarget, "");
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
uiDefBut(block, LABEL, B_CONSTRAINT_TEST, "Align:", *xco+5, *yco-42, 50, 18, NULL, 0.0, 0.0, 0.0, 0.0, "");
uiDefButBitI(block, TOG, 1, B_CONSTRAINT_TEST, "TargetZ", *xco+60, *yco-42, 50, 18, &data->flags, 0, 1, 0, 0, "Target Z axis, not world Z axis, will constrain up direction");
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
uiDefBut(block, LABEL, B_CONSTRAINT_TEST, "To:", *xco+12, *yco-64, 25, 18, NULL, 0.0, 0.0, 0.0, 0.0, "");