Cycles: Update compositor when debug or denoising passes are changed
authorLukas Stockner <lukas.stockner@freenet.de>
Fri, 26 May 2017 00:13:21 +0000 (02:13 +0200)
committerLukas Stockner <lukas.stockner@freenet.de>
Fri, 26 May 2017 00:13:21 +0000 (02:13 +0200)
intern/cycles/blender/addon/properties.py

index 51b53a43d0b9a2152ae72c105a968e2040c4d291..8bb25aba13c740f0e37ba3735b69a336cfc69bee 100644 (file)
@@ -1166,6 +1166,12 @@ class CyclesCurveRenderSettings(bpy.types.PropertyGroup):
     def unregister(cls):
         del bpy.types.Scene.cycles_curves
 
+def update_render_passes(self, context):
+    scene = context.scene
+    rd = scene.render
+    rl = rd.layers.active
+    rl.update_render_passes()
+
 class CyclesRenderLayerSettings(bpy.types.PropertyGroup):
     @classmethod
     def register(cls):
@@ -1178,21 +1184,25 @@ class CyclesRenderLayerSettings(bpy.types.PropertyGroup):
                 name="Debug BVH Traversed Nodes",
                 description="Store Debug BVH Traversed Nodes pass",
                 default=False,
+                update=update_render_passes,
                 )
         cls.pass_debug_bvh_traversed_instances = BoolProperty(
                 name="Debug BVH Traversed Instances",
                 description="Store Debug BVH Traversed Instances pass",
                 default=False,
+                update=update_render_passes,
                 )
         cls.pass_debug_bvh_intersections = BoolProperty(
                 name="Debug BVH Intersections",
                 description="Store Debug BVH Intersections",
                 default=False,
+                update=update_render_passes,
                 )
         cls.pass_debug_ray_bounces = BoolProperty(
                 name="Debug Ray Bounces",
                 description="Store Debug Ray Bounces pass",
                 default=False,
+                update=update_render_passes,
                 )
 
         cls.use_denoising = BoolProperty(
@@ -1267,6 +1277,7 @@ class CyclesRenderLayerSettings(bpy.types.PropertyGroup):
                 name="Store denoising passes",
                 description="Store the denoising feature passes and the noisy image",
                 default=False,
+                update=update_render_passes,
         )
 
     @classmethod