Fix T44396 - Compositing render slots don't work

Note 1: If you go to a render slot previously rendered and change
something in the compositing the buffer will still vanish.

This is an old bug, T44181, and not addressed here
(I'm basically just fixing the regression introduced with multiview)

Note 2: I have a work in progress patch to get rid of
RenderResult->rectf/rect32/rectz entirely. It still not working, and we
should have a working code base before doing refactoring anyways.
This commit is contained in:
Dalai Felinto 2015-04-22 18:44:30 -03:00
parent 6a1c123df4
commit ecb3362a24
Notes: blender-bot 2023-02-14 09:14:24 +01:00
Referenced by issue #44532, Loop Cut/ Loop Select
Referenced by issue #44498, Blender crashes in some files after render slots fix
Referenced by issue #44396, Compositing Render Slots don't Work
1 changed files with 8 additions and 3 deletions

View File

@ -3522,6 +3522,7 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_
{
Render *re;
RenderResult rres;
RenderView *rv;
float *rectf, *rectz;
unsigned int *rect;
float dither;
@ -3570,10 +3571,14 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **lock_
*lock_r = re;
}
rv = BLI_findlink(&rres.views, actview);
if (rv == NULL)
rv = rres.views.first;
/* this gives active layer, composite or sequence result */
rect = (unsigned int *)rres.rect32;
rectf = rres.rectf;
rectz = rres.rectz;
rect = (unsigned int *)rv->rect32;
rectf = rv->rectf;
rectz = rv->rectz;
dither = iuser->scene->r.dither_intensity;
/* combined layer gets added as first layer */