Regression: Image Texture node: color space and alpha changes are ignored in undo/redo #103242
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#103242
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.19045-SP0 64 Bits
Graphics card: Radeon RX 570 Series ATI Technologies Inc. 4.5.0 Core Profile Context 22.11.2.221130
Blender Version
Broken: version: 3.5.0 Alpha, branch: master, commit date: 2022-12-15 01:17, hash:
0240b89599
Worked: 3.1
Caused by
e06399c223
Also confirmed broken in 3.2.2, 3.3.2, and 3.4.0.
Short description of error
Color space and alpha setting changes in Image Texture node are ignored in undo/redo.
Exact steps for others to reproduce the error
ImageNodeUndo.blend
ImageNodeUndo.mp4
Added subscriber: @persun
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @PratikPB2123
Image Texture node: color space and alpha changes are ignored in undo/redoto Regression: Image Texture node: color space and alpha changes are ignored in undo/redoAdded subscriber: @mont29
Caused by
e06399c223
@mont29 ^
Added subscribers: @Sergey, @Jeroen-Bakker
I do not think
e06399c223
caused this, but merely revealed that issue (that commit simply prevents clearing all image caches on undo/redo, even when not needed).Also, this is not related to nodes, these settings are Image ones, and issue can be replicated with a picture loaded in the Image editor.
I think the issue here is once again that image is using its own update system (
BKE_image_signal
) that by-passes the depsgraph. Undo can only handle depsgraph-managed updates.Until this is addressed, one possible work-around could be to check for a specific
RECALC
flag in code restoring caches on undo, and skip it then, something along that line (this seems to work, but I suspect we'd need a new dedicated depsgraph tag for that?):P3400: (An Untitled Masterwork)
0
orID_RECALC_ALL
is most certainly not the desired update tag(s) here either.NOTE: This patch snippet addresses the color space issue, but the alpha mode case is exactly the same, see
rna_Image_colormanage_update
code.@Jeroen-Bakker @Sergey wouldn't mind having your thoughts here?
@mont29, I can not think of an easier fix to what you've proposed in the
blo_cache_storage_entry_restore_in_new
.Ideally, the entire image signalling will be replaced with the dependency graph tagging, but I am not sure how to make it work in practice as there is no image ID tag hapenning on undo or redo of the specific property. If the undo system somehow can inform dependency graph the same tag as what is used in the RNA update function that'd make it easy.
As for the
ID_RECALC_ALL
: the comment above it explicitly tells to not use the flag for tagging. I think it is not unreasonable to useID_RECALC_SOURCE
here.Actually the undo system is already storing update tags, and restoring/replaying them when reading an undo step. That's how it avoids re-creating and re-evaluating the DEG from scratch on every undo. See
ID.recalc_up_to_undo_push
,ID.recalc_after_undo_push
, and their usages in code.Ah, great!
Here is a quick prototype of using the dependency graph to invalidate the buffers when the source changes: P3426
it is not something production-ready, as it potentially causes threading conflict if a background dependency graph does full re-evaluation. Need to somehow protect the invalidation to happen unless an explicit tag happened (the depsgraph evaluates all nodes on its first evaluation, unless persuaded otherwise). But even then maybe need to limit such invalidation to the active dependency graphs only.
In any case, there is a potential, but it is a project on its own to replace the signal system with depsgraph tags. For the meanwhile it might be better/safer to follow follow your change in the
blo_cache_storage_entry_restore_in_new
.This issue was referenced by
fc9c39e320
Changed status from 'Confirmed' to: 'Resolved'