[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56027] trunk/blender/release/scripts/ startup/bl_ui/space_view3d.py: remove checks for 'context.scene' when checking if freestyle is enabled.

Campbell Barton ideasman42 at gmail.com
Sun Apr 14 00:21:22 CEST 2013


Revision: 56027
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56027
Author:   campbellbarton
Date:     2013-04-13 22:21:21 +0000 (Sat, 13 Apr 2013)
Log Message:
-----------
remove checks for 'context.scene' when checking if freestyle is enabled.

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/space_view3d.py

Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d.py	2013-04-13 22:12:55 UTC (rev 56026)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d.py	2013-04-13 22:21:21 UTC (rev 56027)
@@ -1891,6 +1891,7 @@
 
     def draw(self, context):
         layout = self.layout
+        with_freestyle = bpy.app.build_options.freestyle
 
         layout.operator_context = 'INVOKE_REGION_WIN'
 
@@ -1915,7 +1916,7 @@
 
         layout.separator()
 
-        if context.scene and bpy.app.build_options.freestyle:
+        if with_freestyle:
             layout.operator("mesh.mark_freestyle_edge").clear = False
             layout.operator("mesh.mark_freestyle_edge", text="Clear Freestyle Edge").clear = True
 
@@ -1946,6 +1947,7 @@
 
     def draw(self, context):
         layout = self.layout
+        with_freestyle = bpy.app.build_options.freestyle
 
         layout.operator_context = 'INVOKE_REGION_WIN'
 
@@ -1961,7 +1963,7 @@
 
         layout.separator()
 
-        if context.scene and bpy.app.build_options.freestyle:
+        if with_freestyle:
             layout.operator("mesh.mark_freestyle_face").clear = False
             layout.operator("mesh.mark_freestyle_face", text="Clear Freestyle Face").clear = True
 
@@ -2551,6 +2553,7 @@
 
     def draw(self, context):
         layout = self.layout
+        with_freestyle = bpy.app.build_options.freestyle
 
         mesh = context.active_object.data
 
@@ -2558,8 +2561,6 @@
 
         split = layout.split()
 
-        with_freestyle = context.scene and bpy.app.build_options.freestyle
-
         col = split.column()
         col.label(text="Overlays:")
         col.prop(mesh, "show_faces", text="Faces")




More information about the Bf-blender-cvs mailing list