Pressing AKEY in channel buttons (names) of IpoWindow did not show all or
hide all anymore. Was due to commit last july, which enabled unlimited
amount of channels.
This commit is contained in:
Ton Roosendaal
2005-03-01 13:14:37 +00:00
parent 52b84f0e69
commit bc0ca65db8
3 changed files with 12 additions and 18 deletions

View File

@@ -364,7 +364,5 @@ typedef short IPO_Channel;
#define IPO_EDIT 4
#define IPO_LOCK 8
#define IPO_IS_SELECTED 6 /* note, this is number of bit! */
#endif

View File

@@ -823,11 +823,12 @@ static void draw_ipobuts(SpaceIpo *sipo)
ei= sipo->editipo;
y= area->winy-30+sipo->butofs;
for(a=0; a<sipo->totipo; a++, ei++, y-=IPOBUTY) {
but= uiDefButS(block, TOG|BIT|6, a+1, ei->name, v2d->mask.xmax+18, y, IPOBUTX-15, IPOBUTY-1, &(ei->flag), 0, 0, 0, 0, "");
// this button defines visiblity, bit zero of flag (IPO_VISIBLE)
but= uiDefButS(block, TOG|BIT|0, a+1, ei->name, v2d->mask.xmax+18, y, IPOBUTX-15, IPOBUTY-1, &(ei->flag), 0, 0, 0, 0, "");
// no hilite, its not visible, but most of all the winmatrix is not correct later on...
uiButSetFlag(but, UI_TEXT_LEFT|UI_NO_HILITE);
// this fake button defines selection of curves
if(ei->icu) {
cpack(ei->col);

View File

@@ -1164,7 +1164,7 @@ void make_editipo()
ei= G.sipo->editipo;
for(a=0; a<G.sipo->totipo; a++, ei++) {
if(ei->flag & IPO_VISIBLE) ei->flag |= (1<<IPO_IS_SELECTED);
if(ei->flag & IPO_VISIBLE) ei->flag |= IPO_SELECT;
if(ei->icu) ei->icu->flag= ei->flag;
}
@@ -1311,24 +1311,16 @@ void get_status_editipo()
}
}
void update_editipo_flags()
{
EditIpo *ei;
IpoKey *ik;
short flag;/*unsigned int flag;*/
int a;
ei= G.sipo->editipo;
if(ei) {
for(a=0; a<G.sipo->totipo; a++, ei++) {
ei->flag &= ~IPO_VISIBLE;
flag= (1<<IPO_IS_SELECTED);
if( ei->flag & flag ) ei->flag |= IPO_VISIBLE;
if(ei->icu) ei->icu->flag= ei->flag;
}
}
if(G.sipo->showkey) {
@@ -1491,7 +1483,7 @@ void swap_visible_editipo()
if(totipo_vis==0) {
if(ei->icu) {
ei->flag |= IPO_VISIBLE;
ei->flag |= (1<<IPO_IS_SELECTED);
ei->flag |= IPO_SELECT;
}
}
else ei->flag &= ~IPO_VISIBLE;
@@ -1685,16 +1677,19 @@ void move_to_frame()
/* *********************************** */
/* handling of right-hand channel/curve buttons in ipo window */
void do_ipowin_buts(short event)
{
EditIpo *ei = 0;
int a;
/* without shift, all other channels are made invisible */
if((G.qual & LR_SHIFTKEY)==0) {
if(event>G.sipo->totipo) return;
ei = G.sipo->editipo;
for(a=0; a<G.sipo->totipo; a++) {
if(a==event) ei->flag |= (1<<IPO_IS_SELECTED);
else ei->flag &= ~(1<<IPO_IS_SELECTED);
if(a!=event) ei->flag &= ~IPO_VISIBLE;
else ei->flag |= IPO_VISIBLE;
ei++;
}
}
@@ -1709,6 +1704,7 @@ void do_ipowin_buts(short event)
}
/* the fake buttons to the left of channel names, for select/deselect curves */
void do_ipo_selectbuttons()
{
EditIpo *ei, *ei1;
@@ -1733,8 +1729,7 @@ void do_ipo_selectbuttons()
if(ei->icu) {
if((ei->flag & IPO_VISIBLE)==0) {
ei->flag |= IPO_VISIBLE;
ei->flag |= (1<<IPO_IS_SELECTED);
ei->flag |= IPO_VISIBLE|IPO_SELECT;
}
if((G.qual & LR_SHIFTKEY)==0) {