Files
test2/source/blender/makesdna/DNA_image_defaults.h
Brecht Van Lommel cfca7ac952 Fix #133943: Unnecessary image full update mark on file open
This would be done when the frame, layer, pass or view changes compared to
the previous value. But for cases like old files without these members or
loading the image datablock into a different scene, this considered the image
to be always be changed on file load.

Now always reset this state on file load, and don't consider the initial
state as an image update.

This could also happen in the middle of GPU rendering, causing the GPU
texture to be freed while still in use.

Pull Request: https://projects.blender.org/blender/blender/pulls/134198
2025-02-07 21:23:48 +01:00

35 lines
654 B
C

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup DNA
*/
#pragma once
/* clang-format off */
/* -------------------------------------------------------------------- */
/** \name Image Struct
* \{ */
#define _DNA_DEFAULT_Image \
{ \
.aspx = 1.0, \
.aspy = 1.0, \
.gen_x = 1024, \
.gen_y = 1024, \
.gen_type = IMA_GENTYPE_GRID, \
\
.gpuframenr = IMAGE_GPU_FRAME_NONE, \
.gpu_pass = IMAGE_GPU_PASS_NONE, \
.gpu_layer = IMAGE_GPU_LAYER_NONE, \
.gpu_view = IMAGE_GPU_VIEW_NONE, \
.seam_margin = 8, \
}
/** \} */
/* clang-format on */