[Bf-blender-cvs] [7d3589e6601] blender2.8: Cleanup: pep8, single quotes for enums

Campbell Barton noreply at git.blender.org
Wed Jun 20 18:24:18 CEST 2018


Commit: 7d3589e66010d7489b32219a7c8d427b69b7292e
Author: Campbell Barton
Date:   Wed Jun 20 18:21:01 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB7d3589e66010d7489b32219a7c8d427b69b7292e

Cleanup: pep8, single quotes for enums

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

M	intern/cycles/blender/addon/ui.py
M	release/scripts/startup/bl_ui/properties_object.py
M	release/scripts/startup/bl_ui/space_userpref.py
M	release/scripts/startup/bl_ui/space_view3d.py
M	release/scripts/startup/bl_ui/space_view3d_toolbar.py

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

diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 2f9c486367a..33e60580e37 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -193,7 +193,7 @@ class CYCLES_RENDER_PT_sampling(CyclesButtonsPanel, Panel):
 
         row = layout.row(align=True)
         row.prop(cscene, "seed")
-        row.prop(cscene, "use_animated_seed", text="", icon="TIME")
+        row.prop(cscene, "use_animated_seed", text="", icon='TIME')
 
         layout.prop(cscene, "sampling_pattern", text="Pattern")
 
@@ -1783,7 +1783,7 @@ def draw_pause(self, context):
 
         if view.shading.type == 'RENDERED':
             cscene = scene.cycles
-            layout.prop(cscene, "preview_pause", icon="PAUSE", text="")
+            layout.prop(cscene, "preview_pause", icon='PAUSE', text="")
 
 
 def get_panels():
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index ea05a639125..17034689528 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -95,7 +95,7 @@ class OBJECT_PT_transform(ObjectButtonsPanel, Panel):
 
         row = layout.row(align=True)
         row.prop(ob, "rotation_mode")
-        row.label(text="", icon="BLANK1")
+        row.label(text="", icon='BLANK1')
 
 
 class OBJECT_PT_delta_transform(ObjectButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index e7f667f5d5f..6baca880ce3 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -73,9 +73,9 @@ class USERPREF_HT_header(Header):
             layout.operator("wm.addon_refresh", icon='FILE_REFRESH')
             layout.menu("USERPREF_MT_addons_online_resources")
         elif userpref.active_section == 'LIGHTS':
-            layout.operator('wm.studiolight_install', text="Install MatCap").orientation='MATCAP'
-            layout.operator('wm.studiolight_install', text="Install World HDRI").orientation='WORLD'
-            layout.operator('wm.studiolight_install', text="Install Camera HDRI").orientation='CAMERA'
+            layout.operator('wm.studiolight_install', text="Install MatCap").orientation = 'MATCAP'
+            layout.operator('wm.studiolight_install', text="Install World HDRI").orientation = 'WORLD'
+            layout.operator('wm.studiolight_install', text="Install Camera HDRI").orientation = 'CAMERA'
         elif userpref.active_section == 'THEMES':
             layout.operator("ui.reset_default_theme")
             layout.operator("wm.theme_install")
@@ -1440,12 +1440,13 @@ class USERPREF_PT_addons(Panel):
                 continue
 
             # check if addon should be visible with current filters
-            if ((filter == "All") or
-                        (filter == info["category"]) or
-                        (filter == "Enabled" and is_enabled) or
+            if (
+                    (filter == "All") or
+                    (filter == info["category"]) or
+                    (filter == "Enabled" and is_enabled) or
                     (filter == "Disabled" and not is_enabled) or
                     (filter == "User" and (mod.__file__.startswith((scripts_addons_folder, userpref_addons_folder))))
-                    ):
+            ):
                 if search and search not in info["name"].lower():
                     if info["author"]:
                         if search not in info["author"].lower():
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 6c39f193a72..0dbbf3ab927 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -65,9 +65,11 @@ class VIEW3D_HT_header(Header):
                 row.prop(tool_settings.particle_edit, "select_mode", text="", expand=True)
 
             # Occlude geometry
-            if ((((shading.type not in {'SOLID', 'TEXTURED'}) or not shading.show_xray) and
-                (object_mode == 'PARTICLE_EDIT' or (object_mode == 'EDIT' and obj.type == 'MESH'))) or
-                (object_mode in {'WEIGHT_PAINT', 'VERTEX_PAINT'})):
+            if (
+                    (((shading.type not in {'SOLID', 'TEXTURED'}) or not shading.show_xray) and
+                     (object_mode == 'PARTICLE_EDIT' or (object_mode == 'EDIT' and obj.type == 'MESH'))) or
+                    (object_mode in {'WEIGHT_PAINT', 'VERTEX_PAINT'})
+            ):
                 row = layout.row()
                 row.prop(view, "use_occlude_geometry", text="")
 
@@ -195,7 +197,7 @@ class VIEW3D_HT_header(Header):
         sub.popover(space_type='VIEW_3D', region_type='HEADER', panel_type="VIEW3D_PT_shading")
 
         row = layout.row(align=True)
-        row.prop(overlay, "show_overlays", icon="WIRE", text="")
+        row.prop(overlay, "show_overlays", icon='WIRE', text="")
 
         sub = row.row(align=True)
         sub.active = overlay.show_overlays
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 53947a7d8af..864dcc4b0e9 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1021,7 +1021,6 @@ class VIEW3D_PT_sculpt_symmetry(Panel, View3DPaintPanel):
         row.prop(sculpt, "lock_y", text="Y", toggle=True)
         row.prop(sculpt, "lock_z", text="Z", toggle=True)
 
-
         split = layout.split()
 
         col = split.column()



More information about the Bf-blender-cvs mailing list