forked from bartvdbraak/blender
Fix for [#36321] 'Mark Freestyle Edge' still showing with Cycles renderer
* Now we hide Freestyle properties when "use_shading_nodes" is true.
This commit is contained in:
parent
793e17ef6c
commit
6c5a4aedc2
@ -1973,7 +1973,9 @@ class VIEW3D_MT_edit_mesh_edges(Menu):
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
with_freestyle = bpy.app.build_options.freestyle
|
||||
scene = context.scene
|
||||
|
||||
layout.operator_context = 'INVOKE_REGION_WIN'
|
||||
|
||||
@ -1998,11 +2000,10 @@ class VIEW3D_MT_edit_mesh_edges(Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
if with_freestyle:
|
||||
if with_freestyle and not scene.render.use_shading_nodes:
|
||||
layout.operator("mesh.mark_freestyle_edge").clear = False
|
||||
layout.operator("mesh.mark_freestyle_edge", text="Clear Freestyle Edge").clear = True
|
||||
|
||||
layout.separator()
|
||||
layout.separator()
|
||||
|
||||
layout.operator("mesh.edge_rotate", text="Rotate Edge CW").use_ccw = False
|
||||
layout.operator("mesh.edge_rotate", text="Rotate Edge CCW").use_ccw = True
|
||||
@ -2028,7 +2029,9 @@ class VIEW3D_MT_edit_mesh_faces(Menu):
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
with_freestyle = bpy.app.build_options.freestyle
|
||||
scene = context.scene
|
||||
|
||||
layout.operator_context = 'INVOKE_REGION_WIN'
|
||||
|
||||
@ -2044,11 +2047,10 @@ class VIEW3D_MT_edit_mesh_faces(Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
if with_freestyle:
|
||||
if with_freestyle and not scene.render.use_shading_nodes:
|
||||
layout.operator("mesh.mark_freestyle_face").clear = False
|
||||
layout.operator("mesh.mark_freestyle_face", text="Clear Freestyle Face").clear = True
|
||||
|
||||
layout.separator()
|
||||
layout.separator()
|
||||
|
||||
layout.operator("mesh.poke")
|
||||
layout.operator("mesh.quads_convert_to_tris")
|
||||
@ -2661,6 +2663,7 @@ class VIEW3D_PT_view3d_meshdisplay(Panel):
|
||||
with_freestyle = bpy.app.build_options.freestyle
|
||||
|
||||
mesh = context.active_object.data
|
||||
scene = context.scene
|
||||
|
||||
split = layout.split()
|
||||
|
||||
@ -2680,7 +2683,7 @@ class VIEW3D_PT_view3d_meshdisplay(Panel):
|
||||
col.prop(mesh, "show_edge_seams", text="Seams")
|
||||
col.prop(mesh, "show_edge_sharp", text="Sharp", text_ctxt=i18n_contexts.plural)
|
||||
col.prop(mesh, "show_edge_bevel_weight", text="Bevel")
|
||||
if with_freestyle:
|
||||
if with_freestyle and not scene.render.use_shading_nodes:
|
||||
col.prop(mesh, "show_freestyle_edge_marks", text="Edge Marks")
|
||||
col.prop(mesh, "show_freestyle_face_marks", text="Face Marks")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user