mirror of
https://github.com/blender/blender
synced 2026-10-25 03:07:01 +03:00
This commit adds support to the autosave functionality to handle images and allows autosave to work in Texture paint. This requires two main changes: * Packing all edited & editable images. * Allow autosave to function when the most recent step is an image undo step. The majority of this PR addresses the first change. For all images that are to be autosaved, we pack to a new field on the `Image`, `autosave_packedfiles` and mark the datablock with a new flag, `IMA_AUTOSAVE_TEMPPACK`. This field is used to prepopulate the `Image` datablock runtime cache on file load, which then marks the ImBuf as dirty, so the user will be informed to either save or discard changes. If an image is saved, packed, or reloaded, the autosave information (both the flag and the autosave packed file list) is cleared. Additionally, the autosave information is cleared when the cache is populated when loading the file. As a similar area of concern, we also do this when creating the recovery file, `quit.blend` Part of #134518 Pull Request: https://projects.blender.org/blender/blender/pulls/152453 |
||
|---|---|---|
| .. | ||
| autosave_image_test.blend | ||
| ExternalImage.png | ||