Cycles: Fix denoising passes being written when they're not actually generated
[blender-staging.git] / intern / cycles / blender / addon / engine.py
index b5149b5082ede68254968a7969ba52e5b2870ba2..3018fd5b316ad5a2903c3319aca9e61f148f7637 100644 (file)
@@ -239,7 +239,8 @@ def register_passes(engine, scene, srl):
     if crl.pass_debug_bvh_intersections:       engine.register_pass(scene, srl, "Debug BVH Intersections",       1, "X", 'VALUE')
     if crl.pass_debug_ray_bounces:             engine.register_pass(scene, srl, "Debug Ray Bounces",             1, "X", 'VALUE')
 
-    if crl.use_denoising and crl.denoising_store_passes:
+    cscene = scene.cycles
+    if crl.use_denoising and crl.denoising_store_passes and not cscene.use_progressive_refine:
         engine.register_pass(scene, srl, "Denoising Normal",          3, "XYZ", 'VECTOR')
         engine.register_pass(scene, srl, "Denoising Normal Variance", 3, "XYZ", 'VECTOR')
         engine.register_pass(scene, srl, "Denoising Albedo",          3, "RGB", 'COLOR')