NLA SoC: Muting and Graph-Editor Curve visibility for (Action) Groups

Groups (the Action variety) can now be muted, and also be set to not be drawn in the Graph Editor. These settings get applied to all the F-Curves within the group, overriding any settings individual F-Curves might have, allowing users to quickly mute or hide groups of curves without having to go through clicking on all of them.

Also, added a flag that can be used to set the curve visiblity on AnimData level too. This will be enabled in a future commit.
This commit is contained in:
2009-07-03 10:28:10 +00:00
parent 66efea5e2d
commit b8042f535c
7 changed files with 77 additions and 22 deletions

View File

@@ -492,11 +492,14 @@ static void animsys_evaluate_fcurves (PointerRNA *ptr, ListBase *list, AnimMappe
/* calculate then execute each curve */
for (fcu= list->first; fcu; fcu= fcu->next)
{
/* check if this curve should be skipped */
if ((fcu->flag & (FCURVE_MUTED|FCURVE_DISABLED)) == 0)
{
calculate_fcurve(fcu, ctime);
animsys_execute_fcurve(ptr, remap, fcu);
/* check if this F-Curve doesn't belong to a muted group */
if ((fcu->grp == NULL) || (fcu->grp->flag & AGRP_MUTED)==0) {
/* check if this curve should be skipped */
if ((fcu->flag & (FCURVE_MUTED|FCURVE_DISABLED)) == 0)
{
calculate_fcurve(fcu, ctime);
animsys_execute_fcurve(ptr, remap, fcu);
}
}
}
}
@@ -551,6 +554,10 @@ void animsys_evaluate_action_group (PointerRNA *ptr, bAction *act, bActionGroup
if ELEM(NULL, act, agrp) return;
if ((remap) && (remap->target != act)) remap= NULL;
/* if group is muted, don't evaluated any of the F-Curve */
if (agrp->flag & AGRP_MUTED)
return;
/* calculate then execute each curve */
for (fcu= agrp->channels.first; (fcu) && (fcu->grp == agrp); fcu= fcu->next)
{
@@ -884,6 +891,8 @@ static void nlastrip_evaluate_actionclip (PointerRNA *ptr, ListBase *channels, N
/* check if this curve should be skipped */
if (fcu->flag & (FCURVE_MUTED|FCURVE_DISABLED))
continue;
if ((fcu->grp) && (fcu->grp->flag & AGRP_MUTED))
continue;
/* evaluate the F-Curve's value for the time given in the strip
* NOTE: we use the modified time here, since strip's F-Curve Modifiers are applied on top of this