diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-08-19 15:03:48 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-09-06 10:24:38 +0300 |
commit | 1af6e0daaf6ba47c083e9cd451fe145f7545bc79 (patch) | |
tree | 996fd932c10a4b0d30370e32200c2f038042d463 /source | |
parent | 52fdf42d352970d0bcc21f9978d1ac09ffba938a (diff) |
Fix T90772: Image Editor not sampling color from the the currently
selected pass
Caused by {rBebaa3fcedd23}.
Seems this above commit assumed an ImageUser's multi_index is only used
for Multiview/Stereo? This is not the case, multi_index also stores the
index for layer/pass combination.
If we call both BKE_image_multilayer_index and BKE_image_multiview_index
(even though this is not appropriate/needed for multilayer images?), we
might end up overwriting multi_index again.
note: looking at this I was also wondering why we update the ImageUser
in image-buffer-aquiring funnctions [and not from the UI, e.g.
template_image_layers, but that is a whole different story I guess, see
comment in T90772 as well]
note2: this could also use a utility function (this is not the only
place where this is done), this is fo a cleanup commit.
Maniphest Tasks: T90772
Differential Revision: https://developer.blender.org/D12267
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/image/image_engine.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/draw/engines/image/image_engine.c b/source/blender/draw/engines/image/image_engine.c index 3313494adcc..089ddc8045b 100644 --- a/source/blender/draw/engines/image/image_engine.c +++ b/source/blender/draw/engines/image/image_engine.c @@ -111,7 +111,9 @@ static void space_image_gpu_texture_get(Image *image, /* update multiindex and pass for the current eye */ BKE_image_multilayer_index(image->rr, &sima->iuser); } - BKE_image_multiview_index(image, &sima->iuser); + else { + BKE_image_multiview_index(image, &sima->iuser); + } if (ibuf) { const int sima_flag = sima->flag & ED_space_image_get_display_channel_mask(ibuf); |