Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-14 18:28:13 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-14 19:00:06 +0300
commiteefd68013cb8b4c9e69bf76d9f7ad3d8bd68e065 (patch)
tree828bec403291b1a3013188aa80c6c2ac3aec3de0 /source/blender/editors/space_info/info_ops.c
parent0ab7e78b85cdb08813f645ea98d028047c289492 (diff)
Cleanup: isolate image dirty flag access in functions
Diffstat (limited to 'source/blender/editors/space_info/info_ops.c')
-rw-r--r--source/blender/editors/space_info/info_ops.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c
index 171d8505222..bf43e493cc5 100644
--- a/source/blender/editors/space_info/info_ops.c
+++ b/source/blender/editors/space_info/info_ops.c
@@ -160,19 +160,11 @@ static int pack_all_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(ev
{
Main *bmain = CTX_data_main(C);
Image *ima;
- ImBuf *ibuf;
// first check for dirty images
for (ima = bmain->images.first; ima; ima = ima->id.next) {
- if (BKE_image_has_loaded_ibuf(ima)) { /* XXX FIX */
- ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL);
-
- if (ibuf && (ibuf->userflags & IB_BITMAPDIRTY)) {
- BKE_image_release_ibuf(ima, ibuf, NULL);
- break;
- }
-
- BKE_image_release_ibuf(ima, ibuf, NULL);
+ if (BKE_image_is_dirty(ima)) {
+ break;
}
}