Blender Git Commit Log

Git Commits -> Revision 3850fdd

Revision 3850fdd by Julian Eisel (master)
November 24, 2021, 10:26 (GMT)
Assets: Sanitize threaded preview creation with undo

Basically, this fixes disappearing previews when editing asset metadata
or performing undo/redo actions.

The preview generation in a background job will eventually modify ID
data, but the undo push was done prior to that. So obviously, an undo
then would mean the preview is lost.

This patch makes it so undo/redo will regenerate the preview, if the preview
rendering was invoked but not finished in the undone/redone state.

The preview flag PRV_UNFINISHED wasn't entirely what we needed. So I had to
change it to a slightly different flag, with different semantics.

Commit Details:

Full Hash: 3850fdd5b957aa3b8f70d3c0b952b07af6b07fe1
Parent Commit: 98a5658
Lines Changed: +115, -20

10 Modified Paths:

/source/blender/blenkernel/intern/icons.cc (+12, -17) (Diff)
/source/blender/editors/include/ED_render.h (+6, -0) (Diff)
/source/blender/editors/interface/interface_icons.c (+2, -1) (Diff)
/source/blender/editors/render/render_preview.c (+43, -0) (Diff)
/source/blender/editors/undo/memfile_undo.c (+42, -0) (Diff)
/source/blender/editors/util/ed_util_ops.cc (+1, -1) (Diff)
/source/blender/makesdna/DNA_ID.h (+1, -1) (Diff)
/source/blender/windowmanager/intern/wm_event_system.c (+4, -0) (Diff)
/source/blender/windowmanager/intern/wm_files.c (+3, -0) (Diff)
/source/blender/windowmanager/intern/wm_init_exit.c (+1, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021