1
$\begingroup$

Denoiser wastes quite a time on empty renderlayer (about 2 mins for 1080p), but its checkbox can't be keyframed and even LMB's Copy data path is greyed out (so, no scripting I guess).

Animating renderlayer visibility is no option for me, because it messes Multilayer EXR a lot.

$\endgroup$
1

1 Answer 1

1
$\begingroup$

Ended up with this code, where denoiser starts working on specific renderlayer only on certain frames.

import bpy

scene = bpy.context.scene

def denoiser_control (scene): 
if scene.frame_current in list(range(66, 90)) + [1, 20, 50]:
    bpy.data.scenes["Scene"].render.layers["RenderLayer"].cycles.use_denoising = True
else:
    bpy.data.scenes["Scene"].render.layers["RenderLayer"].cycles.use_denoising = False

bpy.app.handlers.frame_change_pre.append(denoiser_control)

range(66, 90) stands for some frame range and [1, 20, 50] defines single frames.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .