Fix T78801: Eevee missing setting to enable/disable freestyle per view layer

This was only visible when Cycles was enabled.
This commit is contained in:
Brecht Van Lommel 2020-07-10 18:40:35 +02:00
parent 4e8fc15586
commit 48f10319c6
2 changed files with 9 additions and 4 deletions

View File

@ -782,10 +782,6 @@ class CYCLES_RENDER_PT_filter(CyclesButtonsPanel, Panel):
col.prop(view_layer, "use_solid", text="Surfaces")
col.prop(view_layer, "use_strand", text="Hair")
col.prop(view_layer, "use_volumes", text="Volumes")
if with_freestyle:
sub = col.row(align=True)
sub.prop(view_layer, "use_freestyle", text="Freestyle")
sub.active = rd.use_freestyle
class CYCLES_RENDER_PT_override(CyclesButtonsPanel, Panel):

View File

@ -115,6 +115,15 @@ class VIEWLAYER_PT_freestyle(ViewLayerFreestyleButtonsPanel, Panel):
bl_label = "Freestyle"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'}
def draw_header(self, context):
view_layer = context.view_layer
rd = context.scene.render
layout = self.layout
layout.active = rd.use_freestyle
layout.prop(view_layer, "use_freestyle", text="")
def draw(self, context):
layout = self.layout