Blender Git Loki
Git Commits -> Revision 0c3b215
Revision 0c3b215 by Jacques Lucke (master) November 2, 2021, 10:17 (GMT) |
Images: refactor how failed image load attempts are remembered Previously, `ImageTile->ok` and `ImageUser->ok` were used to indicate whether an image failed to load. There were three possible values which (probably) had the following meanings: * `0`: There was an error while loading the image. Don't try to load again. * `1`: Default value. Try to load the image. * `2`: The image was loaded successfully. This image-wide flag did not make sense unfortunately, because loading may work for some frames of an image sequence but not for others. Remember than an image data block can also contain a movie. The purpose of the `->ok` flag was to serve as an optimization to avoid trying to load a file over and over again when there is an error (e.g. the file does not exist or is invalid). To get the optimization back, the patch is changing `MovieCache` so that it can also cache failed load attempts. As a consequence, `ibuf` is allowed to be `NULL` in a few more places. I added the appropriate null checks. This also solves issues when image sequences are used with the Image Texture node in Geometry nodes (also see D12827). Differential Revision: https://developer.blender.org/D12957 |
Commit Details:
Full Hash: 0c3b215e7d5456878b155d13440864f49ad1f230
Parent Commit: 2b3becf
Lines Changed: +97, -274
31 Modified Paths:
/source/blender/blenkernel/BKE_image.h (+0, -4) (Diff)
/source/blender/blenkernel/intern/camera.c (+0, -2) (Diff)
/source/blender/blenkernel/intern/image.c (+62, -205) (Diff)
/source/blender/blenkernel/intern/image_gpu.c (+3, -4) (Diff)
/source/blender/blenkernel/intern/movieclip.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/node.cc (+0, -4) (Diff)
/source/blender/blenkernel/intern/object.c (+0, -1) (Diff)
/source/blender/blenkernel/intern/screen.c (+0, -1) (Diff)
/source/blender/blenkernel/intern/texture.c (+0, -1) (Diff)
/source/blender/blenloader/intern/versioning_260.c (+0, -1) (Diff)
/source/blender/blenloader/intern/versioning_280.c (+0, -1) (Diff)
/source/blender/blenloader/intern/versioning_legacy.c (+0, -2) (Diff)
/source/blender/compositor/operations/COM_ViewerOperation.cc (+0, -2) (Diff)
/source/blender/draw/engines/gpencil/gpencil_draw_data.c (+0, -1) (Diff)
/source/blender/editors/object/object_bake_api.c (+2, -5) (Diff)
/source/blender/editors/render/render_internal.c (+0, -1) (Diff)
/source/blender/editors/render/render_opengl.c (+0, -1) (Diff)
/source/blender/editors/render/render_preview.c (+1, -7) (Diff)
/source/blender/editors/sculpt_paint/paint_image_2d.c (+0, -3) (Diff)
/source/blender/editors/space_image/image_buttons.c (+0, -4) (Diff)
/source/blender/editors/space_image/image_ops.c (+2, -2) (Diff)
/source/blender/editors/space_image/image_undo.c (+0, -1) (Diff)
/source/blender/imbuf/IMB_moviecache.h (+1, -1) (Diff)
/source/blender/imbuf/intern/colormanagement.c (+1, -1) (Diff)
/source/blender/imbuf/intern/moviecache.c (+22, -5) (Diff)
/source/blender/makesdna/DNA_image_types.h (+2, -7) (Diff)
/source/blender/makesrna/intern/rna_image_api.c (+0, -1) (Diff)
/source/blender/nodes/composite/nodes/node_composite_image.cc (+0, -2) (Diff)
/source/blender/nodes/composite/nodes/node_composite_splitViewer.cc (+0, -1) (Diff)
/source/blender/nodes/composite/nodes/node_composite_viewer.cc (+0, -1) (Diff)
/source/blender/nodes/texture/nodes/node_texture_image.c (+0, -1) (Diff)
/source/blender/blenkernel/intern/camera.c (+0, -2) (Diff)
/source/blender/blenkernel/intern/image.c (+62, -205) (Diff)
/source/blender/blenkernel/intern/image_gpu.c (+3, -4) (Diff)
/source/blender/blenkernel/intern/movieclip.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/node.cc (+0, -4) (Diff)
/source/blender/blenkernel/intern/object.c (+0, -1) (Diff)
/source/blender/blenkernel/intern/screen.c (+0, -1) (Diff)
/source/blender/blenkernel/intern/texture.c (+0, -1) (Diff)
/source/blender/blenloader/intern/versioning_260.c (+0, -1) (Diff)
/source/blender/blenloader/intern/versioning_280.c (+0, -1) (Diff)
/source/blender/blenloader/intern/versioning_legacy.c (+0, -2) (Diff)
/source/blender/compositor/operations/COM_ViewerOperation.cc (+0, -2) (Diff)
/source/blender/draw/engines/gpencil/gpencil_draw_data.c (+0, -1) (Diff)
/source/blender/editors/object/object_bake_api.c (+2, -5) (Diff)
/source/blender/editors/render/render_internal.c (+0, -1) (Diff)
/source/blender/editors/render/render_opengl.c (+0, -1) (Diff)
/source/blender/editors/render/render_preview.c (+1, -7) (Diff)
/source/blender/editors/sculpt_paint/paint_image_2d.c (+0, -3) (Diff)
/source/blender/editors/space_image/image_buttons.c (+0, -4) (Diff)
/source/blender/editors/space_image/image_ops.c (+2, -2) (Diff)
/source/blender/editors/space_image/image_undo.c (+0, -1) (Diff)
/source/blender/imbuf/IMB_moviecache.h (+1, -1) (Diff)
/source/blender/imbuf/intern/colormanagement.c (+1, -1) (Diff)
/source/blender/imbuf/intern/moviecache.c (+22, -5) (Diff)
/source/blender/makesdna/DNA_image_types.h (+2, -7) (Diff)
/source/blender/makesrna/intern/rna_image_api.c (+0, -1) (Diff)
/source/blender/nodes/composite/nodes/node_composite_image.cc (+0, -2) (Diff)
/source/blender/nodes/composite/nodes/node_composite_splitViewer.cc (+0, -1) (Diff)
/source/blender/nodes/composite/nodes/node_composite_viewer.cc (+0, -1) (Diff)
/source/blender/nodes/texture/nodes/node_texture_image.c (+0, -1) (Diff)