Fix T52011: Border render is incorrect with multiple scenes

The code was somewhat weird: it was first copying border/crop settings from
the "source" scene, then was checking border settings of the current scene
and only then was copying border from "source" scene.

Now we first copy border/crop flags, then copy border from source and then
check whether border is a full-frame.
This commit is contained in:
Sergey Sharybin 2017-07-10 12:17:13 +02:00
parent 5b1c1d4d23
commit 440c91b1f6
Notes: blender-bot 2023-02-14 06:48:45 +01:00
Referenced by issue #52011, Border render is incorrect with multiple scenes
1 changed files with 2 additions and 2 deletions

View File

@ -723,6 +723,8 @@ void RE_InitState(Render *re, Render *source, RenderData *rd,
re->r.size = source->r.size;
}
re_init_resolution(re, source, winx, winy, disprect);
/* disable border if it's a full render anyway */
if (re->r.border.xmin == 0.0f && re->r.border.xmax == 1.0f &&
re->r.border.ymin == 0.0f && re->r.border.ymax == 1.0f)
@ -730,8 +732,6 @@ void RE_InitState(Render *re, Render *source, RenderData *rd,
re->r.mode &= ~R_BORDER;
}
re_init_resolution(re, source, winx, winy, disprect);
if (re->rectx < 1 || re->recty < 1 || (BKE_imtype_is_movie(rd->im_format.imtype) &&
(re->rectx < 16 || re->recty < 16) ))
{