Speakers cannot be muted or unmuted via the API (bpy.data.speakers.muted is broken) #94627
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#94627
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1060 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.12
Blender Version
Broken: version: 3.0.0, branch: master, commit date: 2021-12-02 18:35, hash:
f1cca30557
Worked: 2.79b
Exact steps for others to reproduce the error
Muting the speaker via the UI works normally.
#94627-speaker-mute-depsgraph.blend
Added subscriber: @TrentStanley
Added subscribers: @neXyon, @lichtwerk
Changed status from 'Needs Triage' to: 'Confirmed'
Can confirm.
Not sure why the RNA updates are ifdefed (this seems to be handled by audaspace bindings themselves?)
CC @neXyon
Added subscriber: @ideasman42
There is no RNA update implemented, since it's not necessary. The muted flag is read in
sound_update_base
frequently. What is weird though is that when you set muted toTrue
in python, the actualflag
value of the speaker does not get updated. I tried this by setting a breakpoint in line 1120 insound.c
(just pastconst bool mute = ((strip->flag & NLASTRIP_FLAG_MUTED) || (speaker->flag & SPK_MUTED));
). Is that some weird RNA behavior or bug @ideasman42 ?Added subscriber: @dr.sybren
@neXyon this is caused by failure to update the depsgraph from Python.
The UI always tags the ID with the
ID_RECALC_COPY_ON_WRITE
flag.This is a small patch that fixes this report, P2708 by setting the
ID_RECALC_PARAMETERS
tag, although I don't have a good sense of which flag is best in this case. There areID_RECALC_AUDIO
flags (evenID_RECALC_AUDIO_MUTE
) however these are intended for the scene from what I can tell.If the fix from P2708 is acceptable, we should apply the update function for all other parameters too (volume, pitch .. etc)
CC'ing @dr.sybren have you looked into these audio update issues before?
While investigating this I noticed some other issues which don't seem to be as simple as missing depsgraph tags, so I reported them separately:
One thing I don't understand in the depsgraph is that the audio component of the Object (
OBSpeaker
) and its data (SPSpeaker
) don't have any relation between them. To me this looks like the geometry component of a mesh object not depending on the mesh itself, which would be weird.{F12798584,size=full}
I'd be fine if we use the
ID_RECALC_AUDIO…
tags for this. Looking atdepsgraph_tag_to_component_opcode()
, it's not necessarily meant for only scenes, but just maps to theNodeType::AUDIO
component. From what I can see, it just happens to be the Scene code that uses this, but otherwise it seems to be fine to expand that use to other sources of audio.case ID_RECALC_AUDIO_SEEK:
case ID_RECALC_AUDIO_FPS:
case ID_RECALC_AUDIO_VOLUME:
case ID_RECALC_AUDIO_MUTE:
case ID_RECALC_AUDIO_LISTENER:
case ID_RECALC_AUDIO:
I don't understand the dependency graph system fully, so I cannot really comment on the patch, so it's good from me :D
I guess the other bugs are also caused by the dependency graph?