Fix T83544: Cycles crash when rendering with Save Buffers enabled

The issue is that the "Noisy Image" pass is added even though it should not.

`use_denoising` has to be enabled on the scene and on the view layer
to actually enable it.

Differential Revision: https://developer.blender.org/D10048

Reviewers: lukasstockner97, brecht
This commit is contained in:
Jacques Lucke 2021-01-11 10:21:38 +01:00
parent 4c44a5309c
commit d095411002

@ -282,7 +282,7 @@ def list_render_passes(scene, srl):
yield ("CryptoAsset" + '{:02d}'.format(i), "RGBA", 'COLOR')
# Denoising passes.
if crl.use_denoising or crl.denoising_store_passes:
if (scene.cycles.use_denoising and crl.use_denoising) or crl.denoising_store_passes:
yield ("Noisy Image", "RGBA", 'COLOR')
if crl.denoising_store_passes:
yield ("Denoising Normal", "XYZ", 'VECTOR')