[Bf-blender-cvs] [53ba9f01e2e] master: Fix error in context menu when built without freestyle

Campbell Barton noreply at git.blender.org
Tue Jun 22 09:20:35 CEST 2021


Commit: 53ba9f01e2e7e4efb25143ec45950eaecbe1317f
Author: Campbell Barton
Date:   Tue Jun 22 17:19:02 2021 +1000
Branches: master
https://developer.blender.org/rB53ba9f01e2e7e4efb25143ec45950eaecbe1317f

Fix error in context menu when built without freestyle

===================================================================

M	release/scripts/startup/bl_ui/space_view3d.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 6fa59e048c2..bc66725b7fd 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3727,6 +3727,8 @@ class VIEW3D_MT_edit_mesh_context_menu(Menu):
 
         layout = self.layout
 
+        with_freestyle = bpy.app.build_options.freestyle
+
         layout.operator_context = 'INVOKE_REGION_WIN'
 
         # If nothing is selected
@@ -3844,10 +3846,11 @@ class VIEW3D_MT_edit_mesh_context_menu(Menu):
             col.operator("mesh.mark_sharp")
             col.operator("mesh.mark_sharp", text="Clear Sharp").clear = True
 
-            col.separator()
+            if with_freestyle:
+                col.separator()
 
-            col.operator("mesh.mark_freestyle_edge").clear = False
-            col.operator("mesh.mark_freestyle_edge", text="Clear Freestyle Edge").clear = True
+                col.operator("mesh.mark_freestyle_edge").clear = False
+                col.operator("mesh.mark_freestyle_edge", text="Clear Freestyle Edge").clear = True
 
             col.separator()



More information about the Bf-blender-cvs mailing list