Python: Expose property to mute action groups

This patch adds a `mute` RNA property on `ActionGroup`s that allows them to be easily muted/unmuted from python.
This uses the existing `AGRP_MUTED` flag which was also accessible from the user interface.

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D15329
This commit is contained in:
Falk David 2022-07-26 21:31:36 +02:00 committed by Falk David
parent 8571093f99
commit 88f0d483bd
1 changed files with 5 additions and 0 deletions

View File

@ -696,6 +696,11 @@ static void rna_def_action_group(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Lock", "Action group is locked");
RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_MUTED);
RNA_def_property_ui_text(prop, "Mute", "Action group is muted");
RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL);
prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", AGRP_EXPANDED);