From d068407a004c46d551005b8d401e4f299fea30bb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 18 Jan 2024 11:01:13 +1100 Subject: [PATCH] Fix #114801: Scene.use_audio value flipped Regression in [0] caused the value to be flipped. [0]: e37dc17991668d696497b5af70ad8133db71b107 --- scripts/startup/bl_ui/space_time.py | 2 +- source/blender/makesrna/intern/rna_scene.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/startup/bl_ui/space_time.py b/scripts/startup/bl_ui/space_time.py index e9c16d4f280..76d0d3a82a0 100644 --- a/scripts/startup/bl_ui/space_time.py +++ b/scripts/startup/bl_ui/space_time.py @@ -248,7 +248,7 @@ class TIME_PT_playback(TimelinePanelButtons, Panel): layout.prop(scene, "sync_mode", text="Sync") col = layout.column(heading="Audio") col.prop(scene, "use_audio_scrub", text="Scrubbing") - col.prop(scene, "use_audio", text="Mute") + col.prop(scene, "use_audio") col = layout.column(heading="Playback") col.prop(scene, "lock_frame_selection_to_range", text="Limit to Frame Range") diff --git a/source/blender/makesrna/intern/rna_scene.cc b/source/blender/makesrna/intern/rna_scene.cc index 04d3eb59b4f..b41c2376905 100644 --- a/source/blender/makesrna/intern/rna_scene.cc +++ b/source/blender/makesrna/intern/rna_scene.cc @@ -2123,14 +2123,14 @@ static int rna_Scene_transform_orientation_slots_length(PointerRNA * /*ptr*/) static bool rna_Scene_use_audio_get(PointerRNA *ptr) { Scene *scene = (Scene *)ptr->data; - return (scene->audio.flag & AUDIO_MUTE) != 0; + return (scene->audio.flag & AUDIO_MUTE) == 0; } static void rna_Scene_use_audio_set(PointerRNA *ptr, bool value) { Scene *scene = (Scene *)ptr->data; - if (value) { + if (!value) { scene->audio.flag |= AUDIO_MUTE; } else { @@ -8671,7 +8671,7 @@ void RNA_def_scene(BlenderRNA *brna) prop = RNA_def_property(srna, "use_audio", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_Scene_use_audio_get", "rna_Scene_use_audio_set"); RNA_def_property_ui_text( - prop, "Audio Muted", "Play back of audio from Sequence Editor will be muted"); + prop, "Play Audio", "Play back of audio from Sequence Editor, otherwise mute audio"); RNA_def_property_update(prop, NC_SCENE, "rna_Scene_use_audio_update"); # if 0 /* XXX: Is this actually needed? */