[Bf-blender-cvs] [ad146bd17a8] master: Fix T103852: Muting timeline channel does not update image

Richard Antalik noreply at git.blender.org
Mon Jan 30 06:50:06 CET 2023


Commit: ad146bd17a813fd1c40f83876141571ca221642a
Author: Richard Antalik
Date:   Mon Jan 30 06:45:39 2023 +0100
Branches: master
https://developer.blender.org/rBad146bd17a813fd1c40f83876141571ca221642a

Fix T103852: Muting timeline channel does not update image

Add RNA update function to invalidate cache for all strips in channel.

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

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

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

diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 7dd13324f88..868fc98db40 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -1416,6 +1416,28 @@ static void rna_SequenceTimelineChannel_name_set(PointerRNA *ptr, const char *va
                  sizeof(channel->name));
 }
 
+static void rna_SequenceTimelineChannel_mute_update(Main *bmain,
+                                                    Scene *UNUSED(active_scene),
+                                                    PointerRNA *ptr)
+{
+  Scene *scene = (Scene *)ptr->owner_id;
+  Editing *ed = SEQ_editing_get(scene);
+  SeqTimelineChannel *channel = (SeqTimelineChannel *)ptr;
+
+  Sequence *channel_owner = rna_SeqTimelineChannel_owner_get(ed, channel);
+  ListBase *seqbase;
+  if (channel_owner == NULL) {
+    seqbase = &ed->seqbase;
+  }
+  else {
+    seqbase = &channel_owner->seqbase;
+  }
+
+  LISTBASE_FOREACH (Sequence *, seq, seqbase) {
+    SEQ_relations_invalidate_cache_composite(scene, seq);
+  }
+}
+
 static char *rna_SeqTimelineChannel_path(const PointerRNA *ptr)
 {
   Scene *scene = (Scene *)ptr->owner_id;
@@ -2165,7 +2187,8 @@ static void rna_def_channel(BlenderRNA *brna)
   prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_CHANNEL_MUTE);
   RNA_def_property_ui_text(prop, "Mute channel", "");
-  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_sound_update");
+  RNA_def_property_update(
+      prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTimelineChannel_mute_update");
 }
 
 static void rna_def_editor(BlenderRNA *brna)



More information about the Bf-blender-cvs mailing list