Blender Git Commit Log

Git Commits -> Revision 668b619

Revision 668b619 by Julian Eisel (asset-browser)
May 19, 2021, 17:29 (GMT)
Apply D9974: Sanitize threaded preview creation with undo

With undo/redo after creating assets, previews of the "Current File"
asset library would often go missing, e.g. see T83884.

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.

Commit Details:

Full Hash: 668b61996f5e4a8bea03161a3fb9372d896382f2
Parent Commit: cea5a1a
Lines Changed: +61, -20

5 Modified Paths:

/source/blender/blenkernel/intern/icons.cc (+12, -17) (Diff)
/source/blender/editors/interface/interface_icons.c (+2, -1) (Diff)
/source/blender/editors/undo/memfile_undo.c (+45, -0) (Diff)
/source/blender/editors/util/ed_util_ops.cc (+1, -1) (Diff)
/source/blender/makesdna/DNA_ID.h (+1, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021