diff options
author | Ton Roosendaal <ton@blender.org> | 2005-03-01 16:14:37 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-03-01 16:14:37 +0300 |
commit | bc0ca65db8a9e2b1b62c355cf12ca4ffd9877eb9 (patch) | |
tree | b2c93e85976b235164db01407238886e6b362684 /source | |
parent | 52b84f0e6930ae80e05442d2a88810ae517b586a (diff) |
Bug fix #2248
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesdna/DNA_ipo_types.h | 2 | ||||
-rw-r--r-- | source/blender/src/drawipo.c | 5 | ||||
-rw-r--r-- | source/blender/src/editipo.c | 23 |
3 files changed, 12 insertions, 18 deletions
diff --git a/source/blender/makesdna/DNA_ipo_types.h b/source/blender/makesdna/DNA_ipo_types.h index 206c531d77f..5dccadb00ab 100644 --- a/source/blender/makesdna/DNA_ipo_types.h +++ b/source/blender/makesdna/DNA_ipo_types.h @@ -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 diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c index 8c5b9291236..cadd6ed20b1 100644 --- a/source/blender/src/drawipo.c +++ b/source/blender/src/drawipo.c @@ -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); diff --git a/source/blender/src/editipo.c b/source/blender/src/editipo.c index 8bffeda1b0c..6aac31360f2 100644 --- a/source/blender/src/editipo.c +++ b/source/blender/src/editipo.c @@ -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) { |