Visual Keying refactor

This code was always kludgy and this clean it up a bit.

insertmatrixkey() has been properly renamed insertkey_float().

Matrix calculations have been excised from the interface code,
and placed in insertmatrixkey(), so that you can call it from
anywhere without preliminaries and the proper values are calced
based on the passed adr code.

By much request, several semi-bug reports and discussion with
production animators, visual keying is now used automatic
for objects and bones that have constraints that cause them
to ignore their Ipos (CopyLoc, TrackTo, etc.). In those cases,
visual keying is used instead of the normal Ipo insertion
method. This "auto" functionality is toggled from the 
"Use Visual Keying" button found along with "Needed" and
"Available" in the Edit Methods prefs.

Logic as to which constraints trigger visual keying on
which adrcodes can be tweaked in match_adr_constraint()
src/editipo.c

This has been tested by a couple of people, myself included,
but I may not have hit every constraint case, so evolutionary
feedback is welcome.
This commit is contained in:
2007-07-31 13:37:59 +00:00
parent 5afc4e051f
commit 876cfc837e
4 changed files with 291 additions and 73 deletions

View File

@@ -3486,21 +3486,25 @@ void drawinfospace(ScrArea *sa, void *spacedata)
uiDefBut(block, LABEL,0,"Auto keyframe",
(xpos+(2*edgsp)+(2*mpref)+midsp),y4label,mpref,buth,
(xpos+(2*edgsp)+(2*mpref)+midsp),y5label,mpref,buth,
0, 0, 0, 0, 0, "");
uiDefButBitI(block, TOG, G_RECORDKEYS, REDRAWTIME, "Action and Object",
(xpos+edgsp+(2*mpref)+(2*midsp)),y3,mpref, buth,
(xpos+edgsp+(2*mpref)+(2*midsp)),y4,mpref, buth,
&(G.flags), 0, 0, 0, 0, "Automatic keyframe insertion in Object and Action Ipo curves");
uiBlockBeginAlign(block);
uiDefButBitI(block, TOG, USER_KEYINSERTAVAI, REDRAWTIME, "Available",
(xpos+edgsp+(2*mpref)+(2*midsp)),y2,mpref, buth,
(xpos+edgsp+(2*mpref)+(2*midsp)),y3,mpref, buth,
&(U.uiflag), 0, 0, 0, 0, "Automatic keyframe insertion in available curves");
uiDefButBitI(block, TOG, USER_KEYINSERTNEED, REDRAWTIME, "Needed",
(xpos+edgsp+(2*mpref)+(2*midsp)),y1,mpref, buth,
(xpos+edgsp+(2*mpref)+(2*midsp)),y2,mpref, buth,
&(U.uiflag), 0, 0, 0, 0, "Automatic keyframe insertion only when keyframe needed");
uiDefButBitI(block, TOG, G_AUTOMATKEYS, REDRAWTIME, "Use Visual Keying",
(xpos+edgsp+(2*mpref)+(2*midsp)),y1,mpref, buth,
&(G.flags), 0, 0, 0, 0, "Use Visual keying automatically for constrained objects");
uiBlockEndAlign(block);
/* uiDefButBitS(block, TOG, USER_KEYINSERTACT, 0, "Action",