Fix for missing "Use Freestyle" toggle in the Cycles "Layer" options panel.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Thu, 8 Feb 2018 17:46:20 +0000 (02:46 +0900)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Thu, 8 Feb 2018 17:48:21 +0000 (02:48 +0900)
Reviewed By: Brecht Van Lommel (brecht), Dalai Felinto (dfelinto)

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

intern/cycles/blender/addon/ui.py

index 07fd491dc04550fceb4ee3d0fdc50d7e149eefdd..e3076a8ec2ce4b0ebcdc5b8a832f1a85d3b44e49 100644 (file)
@@ -449,6 +449,7 @@ class CYCLES_RENDER_PT_layer_options(CyclesButtonsPanel, Panel):
 
     def draw(self, context):
         layout = self.layout
+        with_freestyle = bpy.app.build_options.freestyle
 
         scene = context.scene
         rd = scene.render
@@ -477,6 +478,10 @@ class CYCLES_RENDER_PT_layer_options(CyclesButtonsPanel, Panel):
         col.prop(rl, "use_ao", "Use AO")
         col.prop(rl, "use_solid", "Use Surfaces")
         col.prop(rl, "use_strand", "Use Hair")
+        if with_freestyle:
+            row = col.row()
+            row.prop(rl, "use_freestyle", "Use Freestyle")
+            row.active = rd.use_freestyle
 
 
 class CYCLES_RENDER_PT_layer_passes(CyclesButtonsPanel, Panel):