waveforms are reprocessed when undoing #55414
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
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#55414
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
Illegal copy of win 8.1
nVidia GF GT 630
Blender Version
Broken: 2.79.4 c78804a17af (patched by D2424)
BUILD_DATE "Fri 06/08/2018"
BUILD_TIME "04:12 PM"
Short description of error
On each undo action, waveforms of each sound file are reprocessed
Exact steps for others to reproduce the error
Load sound strip into blender VSE
Check "Draw Waveform"
Do undoable action or two(so the "Draw Waveform" stay checked to avoid confusion)
Waveform will redraw
Note
I was digging into this and found that this behavior is caused by function BKE_sound_load() in file sound.c by calling BKE_sound_free_waveform(sound); on line 395
I couldn't find any reason why I would like to free memory at this point, so I bravely commented the line and I wasn't able to cause any weird behavior or crash blender(at least not because of this) and waveforms did not redraw on undo step.
Added subscriber: @iss
Added subscribers: @ideasman42, @lichtwerk
I'm afraid this is how Undo works in blender.
Not aware of any workaround other than disabling "Draw Waveform".
[patching like you did will work fine if you use the same sound, but will fail to draw the correct waveform if you actually load a new file into the same sound datablock...]
But will @ideasman42 decide whether this can be closed...
I tested swapping sound files - it worked OK, because another function is handling this and new waveform is at different memory address.
Undoing this action will therefore correctly swap waveforms back.
EDIT: oops it's not different function, but the fact the new waveform has new address is enough. I am not looking at source now...
This issue was referenced by
f48e81e720
Added subscriber: @mont29
Yeah, we actually have a system to 'pass' that kind of data across undo steps, it’s just being ignored by BKE_sound_load()...
Will fix (and slightly refactor bSound flags, there is at least one flag here that is purely runtime and should be a tag ;) ).
Changed status from 'Open' to: 'Resolved'