Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/anim_filter.c
| Show First 20 Lines • Show All 992 Lines • ▼ Show 20 Lines | |||||
| if (!(filter_mode & ANIMFILTER_ACTGROUPED) || (agrp->flag & AGRP_ACTIVE)) { | if (!(filter_mode & ANIMFILTER_ACTGROUPED) || (agrp->flag & AGRP_ACTIVE)) { | ||||
| /* for the Graph Editor, curves may be set to not be visible in the view to lessen | /* for the Graph Editor, curves may be set to not be visible in the view to lessen | ||||
| * clutter, but to do this, we need to check that the group doesn't have its | * clutter, but to do this, we need to check that the group doesn't have its | ||||
| * not-visible flag set preventing all its sub-curves to be shown | * not-visible flag set preventing all its sub-curves to be shown | ||||
| */ | */ | ||||
| if (!(filter_mode & ANIMFILTER_CURVE_VISIBLE) || !(agrp->flag & AGRP_NOTVISIBLE)) { | if (!(filter_mode & ANIMFILTER_CURVE_VISIBLE) || !(agrp->flag & AGRP_NOTVISIBLE)) { | ||||
| /* group must be editable for its children to be editable (if we care about this) */ | /* group must be editable for its children to be editable (if we care about this) */ | ||||
| if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_AGRP(agrp)) { | if (!(filter_mode & ANIMFILTER_FOREDIT) || EDITABLE_AGRP(agrp)) { | ||||
| /* handle nested groups recursively */ | |||||
| bActionGroup *subgrp; | |||||
| for (subgrp = act->groups.first; subgrp; subgrp = subgrp->next) { | |||||
| if (subgrp->parent == agrp) { | |||||
| tmp_items += animfilter_act_group(ac, &tmp_data, ads, act, subgrp, filter_mode, owner_id); | |||||
| } | |||||
| } | |||||
| /* get first F-Curve which can be used here */ | /* get first F-Curve which can be used here */ | ||||
| FCurve *first_fcu = animfilter_fcurve_next( | FCurve *first_fcu = animfilter_fcurve_next( | ||||
| ads, agrp->channels.first, ANIMTYPE_FCURVE, filter_mode, agrp, owner_id); | ads, agrp->channels.first, ANIMTYPE_FCURVE, filter_mode, agrp, owner_id); | ||||
| /* filter list, starting from this F-Curve */ | /* filter list, starting from this F-Curve */ | ||||
| tmp_items += animfilter_fcurves( | tmp_items += animfilter_fcurves( | ||||
| &tmp_data, ads, first_fcu, ANIMTYPE_FCURVE, filter_mode, agrp, owner_id, &act->id); | &tmp_data, ads, first_fcu, ANIMTYPE_FCURVE, filter_mode, agrp, owner_id, &act->id); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | |||||
| /* TODO: do nested groups? */ | /* TODO: do nested groups? */ | ||||
| for (agrp = act->groups.first; agrp; agrp = agrp->next) { | for (agrp = act->groups.first; agrp; agrp = agrp->next) { | ||||
| /* store reference to last channel of group */ | /* store reference to last channel of group */ | ||||
| if (agrp->channels.last) { | if (agrp->channels.last) { | ||||
| lastchan = agrp->channels.last; | lastchan = agrp->channels.last; | ||||
| } | } | ||||
| /* action group's channels */ | /* action group's channels */ | ||||
| items += animfilter_act_group(ac, anim_data, ads, act, agrp, filter_mode, owner_id); | if (agrp->parent == NULL) { | ||||
| items += animfilter_act_group(ac, anim_data, ads, act, agrp, filter_mode, owner_id); | |||||
| } | |||||
| } | } | ||||
| /* un-grouped F-Curves (only if we're not only considering those channels in the active group) */ | /* un-grouped F-Curves (only if we're not only considering those channels in the active group) */ | ||||
| if (!(filter_mode & ANIMFILTER_ACTGROUPED)) { | if (!(filter_mode & ANIMFILTER_ACTGROUPED)) { | ||||
| FCurve *firstfcu = (lastchan) ? (lastchan->next) : (act->curves.first); | FCurve *firstfcu = (lastchan) ? (lastchan->next) : (act->curves.first); | ||||
| items += animfilter_fcurves( | items += animfilter_fcurves( | ||||
| anim_data, ads, firstfcu, ANIMTYPE_FCURVE, filter_mode, NULL, owner_id, &act->id); | anim_data, ads, firstfcu, ANIMTYPE_FCURVE, filter_mode, NULL, owner_id, &act->id); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 992 Lines • Show Last 20 Lines | |||||