Merge branch 'master' into blender2.8
[blender.git] / intern / cycles / blender / addon / ui.py
index 13bb00949824509464932dadbdd606d3570de94c..d5f72654c723ccbc7476a3a24f935f90c9a23534 100644 (file)
@@ -442,8 +442,10 @@ 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
         view_layer = scene.view_layers.active
 
         col = layout.column()
@@ -451,6 +453,10 @@ class CYCLES_RENDER_PT_layer_options(CyclesButtonsPanel, Panel):
         col.prop(view_layer, "use_ao", "Use AO")
         col.prop(view_layer, "use_solid", "Use Surfaces")
         col.prop(view_layer, "use_strand", "Use Hair")
+        if with_freestyle:
+            row = col.row()
+            row.prop(view_layer, "use_freestyle", "Use Freestyle")
+            row.active = rd.use_freestyle
 
 
 class CYCLES_RENDER_PT_layer_passes(CyclesButtonsPanel, Panel):