Undo steps with texture paint break across memfile steps #61263
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
8 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#61263
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?
Texture paint undo steps don't work properly when mixed with memfile undo (object mode operations).
Undo everything, redo everything.
All correct.
Now switch to object mode and undo, notice the image has been cleared.
Note that this is more of a limit in how image undo works than some mistake in the code. since 2.7x never supported this.
Image painting is an exception that needs special handling since it has undo data that exists outside global undo.
Reporting because this should be fixed before 2.8x release, or worse case we could limit texture paint undo/redo to the current painting session as 2.7x (would be a shame, but better then loosing the users work).
Added subscriber: @ideasman42
#66890 was marked as duplicate of this issue
Texture paint steps break across memfile stepsto Undo steps with texture paint break across memfile stepsAdded subscriber: @dfelinto
Strange that if I do UNDO again after object mode + UNDO, the image is back. For the records, tested with
eff3728db9
.Added subscriber: @DanielGrauer
Added subscriber: @ssendam
Added subscriber: @mano-wii
Has this bug already been fixed? I can't reproduce with the described steps.
Looked into this recently, the painting undo stack now works across mem-file undo steps in some situations (resolved
1d7be99ba4
), however there is still a problem.Even though mem-file undo attempts to keep
Image.cache
between undo steps, there are still times when it's cleared.This clears the
ImBuf
which is the current in-memory state of the image.I'm not sure why this only happens in some cases, needs further investigation.
Added subscriber: @jfmatheu
Can't reproduce this with Blender 2.81 build from 14th August later build and with Blender 2.80 last build
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: Radeon RX 580 Series ATI Technologies Inc. 4.5.13570 Core Profile Context 19.8.1 26.20.13001.29010
Thanks for checking.
This problem happens far less often then it used to, but it can still happen, so keeping this open.
Added subscriber: @lichtwerk
@ideasman42 : I have added this to 2.81 milestone (since it was set to "High"), mind checking again?
The issue is the image cache sometimes gets freed by memfile undo, the image then gets reloaded and the undo tiles are applied on-top of the wrong image data.
I looked into memfile undo image cache pointer map and it doesn't look like some mistake in the code causing this, in fact this works in most cases.
It turns out it's not enough just to correctly remap the images through memfile-undo - because the user can undo to a state before the image existed (which currently frees the image cache).
This test patch shows how keeping the image cache stored as part of the undo system can fix the issue, P1103. This adds ID / undo users to
MovieCache
. There might be better ways to keep the data around between memfile undo's though.Added subscribers: @Sergey, @brecht
Note, talked to @brecht and @Sergey - P1103 is too fragile.
I'm working on making the undo system store all image data, since the image cache isn't reliable enough to apply changes to.
This issue was referenced by
151cc02b6f
Changed status from 'Open' to: 'Resolved'
Added subscribers: @SethTooQuick, @linosia, @Wallis