Two little issues for Timeline window;

- Using Arrowkeys to change frames didn't give proper redraw
- Option "Record" now tied to the User-preset "Auto key insert". It is
  no user preset anymore even, I thought to leave a button in the User-
  presets for the time being though...
This commit is contained in:
Ton Roosendaal
2005-05-05 18:31:39 +00:00
parent 2b0f00d4bd
commit b33536cdaa
5 changed files with 20 additions and 16 deletions

View File

@@ -955,9 +955,6 @@ void paste_posebuf (int flip){
/* Safely merge all of the channels in this pose into
any existing pose */
if (ob->pose){
if (U.uiflag & USER_KEYINSERTACT){
/* Display "Avail, all" dialog */
}
for (chan=g_posebuf->chanbase.first; chan; chan=chan->next){
if (chan->flag & POSE_KEY){
temp = copy_pose_channel (chan);
@@ -973,7 +970,7 @@ void paste_posebuf (int flip){
temp = set_pose_channel (ob->pose, temp);
if (U.uiflag & USER_KEYINSERTACT){
if (G.flags & G_RECORDKEYS){
/* Set keys on pose */
if (chan->flag & POSE_ROT){
set_action_key(ob->action, temp, AC_QUAT_X, newchan);
@@ -995,7 +992,7 @@ void paste_posebuf (int flip){
}
}
if (U.uiflag & USER_KEYINSERTACT){
if (G.flags & G_RECORDKEYS){
remake_action_ipos(ob->action);
allqueue (REDRAWIPO, 0);
allqueue (REDRAWVIEW3D, 0);

View File

@@ -316,7 +316,7 @@ void time_buttons(ScrArea *sa)
xco, 0, XIC, YIC, 0, 0, 0, 0, 0, "Skip to End frame (Shift UpArrow)");
xco+= XIC+8;
uiDefIconButBitI(block, TOG, G_RECORDKEYS, 0, ICON_REC,
uiDefIconButBitI(block, TOG, G_RECORDKEYS, REDRAWINFO, ICON_REC,
xco, 0, XIC, YIC, &(G.flags), 0, 0, 0, 0, "Automatically insert keyframes in Object and Action Ipo curves");
xco+= XIC+16;

View File

@@ -500,6 +500,7 @@ static void do_update_for_newframe(int mute)
allqueue(REDRAWINFO, 1);
allqueue(REDRAWSEQ, 1);
allqueue(REDRAWSOUND, 1);
allqueue(REDRAWTIME, 1);
allqueue(REDRAWBUTSHEAD, 0);
allqueue(REDRAWBUTSSHADING, 0);
allqueue(REDRAWBUTSOBJECT, 0);
@@ -2104,5 +2105,6 @@ void do_headerbuttons(short event)
else if(event<750) do_action_buttons(event);
else if(event<800) do_time_buttons(curarea, event);
else if(event<900) do_nla_buttons(event);
else if(event>=REDRAWVIEW3D) allqueue(event, 0);
}

View File

@@ -2556,15 +2556,19 @@ void drawinfospace(ScrArea *sa, void *spacedata)
&(U.uiflag), 2, 64, 0, 0, "");
uiDefBut(block, LABEL,0,"Auto keyframe on:",
uiDefBut(block, LABEL,0,"Auto keyframe",
(xpos+(2*edgsp)+(2*mpref)+midsp),y3label,mpref,buth,
0, 0, 0, 0, 0, "");
uiDefButBitS(block, TOG, USER_KEYINSERTACT, 0, "Action",
(xpos+edgsp+(2*mpref)+(2*midsp)),y2,(spref+edgsp),buth,
&(U.uiflag), 0, 0, 0, 0, "Automatic keyframe insertion in Action Ipo curve");
uiDefButBitS(block, TOG, USER_KEYINSERTOBJ, 0, "Object",
(xpos+edgsp+(2*mpref)+(3*midsp)+spref-edgsp),y2,(spref+edgsp),buth,
&(U.uiflag), 0, 0, 0, 0, "Automatic keyframe insertion in Object Ipo curve");
uiDefButBitI(block, TOG, G_RECORDKEYS, REDRAWTIME, "Action and Object",
(xpos+edgsp+(2*mpref)+(2*midsp)),y2,mpref, buth,
&(G.flags), 0, 0, 0, 0, "Automatic keyframe insertion in Object and Action Ipo curves");
// uiDefButBitS(block, TOG, USER_KEYINSERTACT, 0, "Action",
// (xpos+edgsp+(2*mpref)+(2*midsp)),y2,(spref+edgsp),buth,
// &(U.uiflag), 0, 0, 0, 0, "Automatic keyframe insertion in Action Ipo curve");
// uiDefButBitS(block, TOG, USER_KEYINSERTOBJ, 0, "Object",
// (xpos+edgsp+(2*mpref)+(3*midsp)+spref-edgsp),y2,(spref+edgsp),buth,
// &(U.uiflag), 0, 0, 0, 0, "Automatic keyframe insertion in Object Ipo curve");
uiDefBut(block, LABEL,0,"Duplicate with object:",
@@ -2940,7 +2944,8 @@ static void winqreadinfospace(ScrArea *sa, void *spacedata, BWinEvent *evt)
switch(event) {
case UI_BUT_EVENT:
if(val==B_ADD_THEME) {
if(val==REDRAWTIME) allqueue(REDRAWTIME, 0);
else if(val==B_ADD_THEME) {
bTheme *btheme, *new;
btheme= U.themes.first;

View File

@@ -1846,7 +1846,7 @@ void special_aftertrans_update(char mode, int flip, short canceled, int keyflags
*/
clear_bone_nocalc_ob(G.obpose);
if (U.uiflag & USER_KEYINSERTACT && !canceled){
if ((G.flags & G_RECORDKEYS) && !canceled){
act=G.obpose->action;
pose=G.obpose->pose;
@@ -1954,7 +1954,7 @@ void special_aftertrans_update(char mode, int flip, short canceled, int keyflags
where_is_object(ob); /* always do, for track etc. */
/* Set autokey if necessary */
if ((U.uiflag & USER_KEYINSERTOBJ) && (!canceled) && (base->flag & SELECT)){
if ((G.flags & G_RECORDKEYS) && (!canceled) && (base->flag & SELECT)){
if (keyflags){
insertkey(&base->object->id, OB_ROT_X);
insertkey(&base->object->id, OB_ROT_Y);