Orange: some better support for new bone layers: action window now draws

nicer... it was still counting all bones for defining visible area, so
many times channels got displayed out of view.
This commit is contained in:
Ton Roosendaal
2005-12-21 19:58:44 +00:00
parent 63c8678263
commit dabd52f89d
2 changed files with 18 additions and 14 deletions

View File

@@ -437,18 +437,9 @@ void calc_action_range(const bAction *act, float *start, float *end)
if(act) {
for (chan=act->chanbase.first; chan; chan=chan->next) {
if(chan->ipo) {
for (icu=chan->ipo->curve.first; icu; icu=icu->next) {
if(icu->totvert) {
min= MIN2 (min, icu->bezt[0].vec[1][0]);
max= MAX2 (max, icu->bezt[icu->totvert-1].vec[1][0]);
foundvert=1;
}
}
}
for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) {
if(conchan->ipo) {
for (icu=conchan->ipo->curve.first; icu; icu=icu->next) {
if((chan->flag & ACHAN_HIDDEN)==0) {
if(chan->ipo) {
for (icu=chan->ipo->curve.first; icu; icu=icu->next) {
if(icu->totvert) {
min= MIN2 (min, icu->bezt[0].vec[1][0]);
max= MAX2 (max, icu->bezt[icu->totvert-1].vec[1][0]);
@@ -456,6 +447,17 @@ void calc_action_range(const bAction *act, float *start, float *end)
}
}
}
for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) {
if(conchan->ipo) {
for (icu=conchan->ipo->curve.first; icu; icu=icu->next) {
if(icu->totvert) {
min= MIN2 (min, icu->bezt[0].vec[1][0]);
max= MAX2 (max, icu->bezt[icu->totvert-1].vec[1][0]);
foundvert=1;
}
}
}
}
}
}
}

View File

@@ -349,8 +349,10 @@ int count_action_levels(bAction *act)
return 0;
for (achan=act->chanbase.first; achan; achan=achan->next){
y+=1;
y+=BLI_countlist(&achan->constraintChannels);
if((achan->flag & ACHAN_HIDDEN)==0) {
y+=1;
y+=BLI_countlist(&achan->constraintChannels);
}
}
return y;