Fix #136830: When multiple F-Curves are marked as active, only one is drawn
When multiple F-Curves have the `FCURVE_ACTIVE` flag set, only one of them was drawn in the graph editor. Only one F-Curve should be marked with this flag, but that's not something the datamodel enforces. Because of that, it apparently is possible to get into a situation where multiple F-Curves are marked as such. They are now all drawn properly. Pull Request: https://projects.blender.org/blender/blender/pulls/137102
This commit is contained in:
@@ -1491,7 +1491,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceGraph *sipo, ARegion *region, shor
|
||||
bAnimListElem *ale_active_fcurve = nullptr;
|
||||
LISTBASE_FOREACH (bAnimListElem *, ale, &anim_data) {
|
||||
const FCurve *fcu = (FCurve *)ale->key_data;
|
||||
if (fcu->flag & FCURVE_ACTIVE) {
|
||||
if ((fcu->flag & FCURVE_ACTIVE) && !ale_active_fcurve) {
|
||||
ale_active_fcurve = ale;
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user