[Bf-blender-cvs] [88f0d483bd6] master: Python: Expose property to mute action groups

Falk David noreply at git.blender.org
Tue Jul 26 21:32:38 CEST 2022


Commit: 88f0d483bd6ab5f3a6084c8e9ed521abd8428092
Author: Falk David
Date:   Tue Jul 26 21:31:36 2022 +0200
Branches: master
https://developer.blender.org/rB88f0d483bd6ab5f3a6084c8e9ed521abd8428092

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

===================================================================

M	source/blender/makesrna/intern/rna_action.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index ac90ec69784..bcfb646ca19 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -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);



More information about the Bf-blender-cvs mailing list