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:
authorPhilipp Oeser <info@graphics-engineer.com>2021-11-01 13:03:58 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-11-02 15:25:51 +0300
commit619c51592fcf1efcdc960386385f8a511c2a590e (patch)
tree7b18168a08cbe2d8504f761a4b0a08a3a8f8ea9b
parentf9f6d8de58a350a4ba7110e6fc7bf7ea14c6daa0 (diff)
Fix T92608: Image Editor does not display stereo images
Caused by own {rB5aa3167e48b2}. Related commit: {rBebaa3fcedd23}. For stereo renders, `BKE_image_is_multilayer` is true, however we seem to get to down to `space_image_gpu_texture_get` [where this is called] from `IMAGE_cache_init` with a NULL Image->RenderResult. So what then happens is that `BKE_image_multilayer_index` is called and even though it has an appropriate codepath for stereo, it earlies out and does not set multi_index correctly. Still a bit puzzled why RenderResult is NULL for a render, but since other places also check for a valid RenderResult before going down the _multilayer_ route (and doing _multiview_ instead), now do the same thing, BKE_image_multiview_index is now called in these cases (and seems to behave correctly, checked with layers and passes and all seems to display correctly, either in stereo or choosing individual eyes). thx @jbakker & @brecht for double-checking. Maniphest Tasks: T92608 Differential Revision: https://developer.blender.org/D13063
-rw-r--r--source/blender/draw/engines/image/image_engine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/image/image_engine.c b/source/blender/draw/engines/image/image_engine.c
index 089ddc8045b..201b44e04ea 100644
--- a/source/blender/draw/engines/image/image_engine.c
+++ b/source/blender/draw/engines/image/image_engine.c
@@ -107,8 +107,8 @@ static void space_image_gpu_texture_get(Image *image,
{
const DRWContextState *draw_ctx = DRW_context_state_get();
SpaceImage *sima = (SpaceImage *)draw_ctx->space_data;
- if (BKE_image_is_multilayer(image)) {
- /* update multiindex and pass for the current eye */
+ if (image->rr != NULL) {
+ /* Update multi-index and pass for the current eye. */
BKE_image_multilayer_index(image->rr, &sima->iuser);
}
else {