Fix T46679: ZMask layers don't update w/ animation

Make sure z-mask layers aren't excluded for animation evaluation.
This commit is contained in:
Campbell Barton 2016-01-26 23:29:51 +11:00
parent 8126b0222d
commit e4c83bc345
Notes: blender-bot 2023-02-14 08:27:41 +01:00
Referenced by issue #47298, rendering animation(cycles) repeats rendering the same frame over and over
Referenced by issue #46679, Render Image output renders correctly but Render Animation output is incorrect.
1 changed files with 2 additions and 2 deletions

View File

@ -606,7 +606,7 @@ int RE_engine_render(Render *re, int do_all)
if (re->r.scemode & R_SINGLE_LAYER) {
srl = BLI_findlink(&re->r.layers, re->r.actlay);
if (srl) {
non_excluded_lay |= ~srl->lay_exclude;
non_excluded_lay |= ~(srl->lay_exclude & ~srl->lay_zmask);
/* in this case we must update all because animation for
* the scene has not been updated yet, and so may not be
@ -618,7 +618,7 @@ int RE_engine_render(Render *re, int do_all)
else {
for (srl = re->r.layers.first; srl; srl = srl->next) {
if (!(srl->layflag & SCE_LAY_DISABLE)) {
non_excluded_lay |= ~srl->lay_exclude;
non_excluded_lay |= ~(srl->lay_exclude & ~srl->lay_zmask);
if (render_layer_exclude_animated(re->scene, srl))
non_excluded_lay |= ~0;