[Bf-blender-cvs] [9f2b3fc80e9] blender2.8: Cleanup: prefer parenthesis over breaking lines

Campbell Barton noreply at git.blender.org
Wed Oct 10 02:22:26 CEST 2018


Commit: 9f2b3fc80e90f5ffcb334051f58df16292d81ff1
Author: Campbell Barton
Date:   Wed Oct 10 11:21:30 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB9f2b3fc80e90f5ffcb334051f58df16292d81ff1

Cleanup: prefer parenthesis over breaking lines

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

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

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

diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py
index df01a732da4..96c78f6a7d8 100644
--- a/release/scripts/startup/bl_ui/properties_freestyle.py
+++ b/release/scripts/startup/bl_ui/properties_freestyle.py
@@ -804,8 +804,10 @@ class MaterialFreestyleButtonsPanel:
         scene = context.scene
         material = context.material
         with_freestyle = bpy.app.build_options.freestyle
-        return with_freestyle and material and scene and scene.render.use_freestyle and \
+        return (
+            with_freestyle and material and scene and scene.render.use_freestyle and
             (context.engine in cls.COMPAT_ENGINES)
+        )
 
 
 class MATERIAL_PT_freestyle_line(MaterialFreestyleButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 74a4daaefd4..45c63b995ee 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -1209,8 +1209,10 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
 
         layout.prop(part, "render_type", text="Render As")
 
-        if part.type == 'EMITTER' or \
-           (part.render_type in {'OBJECT', 'COLLECTION'} and part.type == 'HAIR'):
+        if (
+                part.type == 'EMITTER' or
+                (part.render_type in {'OBJECT', 'COLLECTION'} and part.type == 'HAIR')
+        ):
             if part.render_type not in {'NONE'}:
 
                 col = layout.column(align=True)
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index b6b07f7e6d1..ea71eb88d97 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -113,8 +113,7 @@ class VIEW3D_HT_header(Header):
             current_orientation = scene.current_orientation
 
             if not current_orientation:
-                trans_orientation = \
-                    bpy.types.Scene.bl_rna.properties["transform_orientation"].enum_items[orientation]
+                trans_orientation = bpy.types.Scene.bl_rna.properties["transform_orientation"].enum_items[orientation]
                 trans_icon = getattr(trans_orientation, "icon", "BLANK1")
                 trans_name = getattr(trans_orientation, "name", "Orientation")
             else:
@@ -218,8 +217,7 @@ class VIEW3D_HT_header(Header):
         # grease pencil
         if object_mode == 'GPENCIL_PAINT':
             origin = tool_settings.gpencil_stroke_placement_view3d
-            gp_origin = \
-                tool_settings.bl_rna.properties['gpencil_stroke_placement_view3d'].enum_items[origin]
+            gp_origin = tool_settings.bl_rna.properties['gpencil_stroke_placement_view3d'].enum_items[origin]
 
             or_icon = getattr(gp_origin, "icon", "BLANK1")
             or_name = getattr(gp_origin, "name", "Stroke Placement")
@@ -1823,9 +1821,11 @@ class VIEW3D_MT_object_specials(Menu):
             if emission_node is not None:
                 props = layout.operator("wm.context_modal_mouse", text="Strength")
                 props.data_path_iter = "selected_editable_objects"
-                props.data_path_item = "data.node_tree" \
-                                       ".nodes[\"" + emission_node.name + "\"]" \
-                                       ".inputs[\"Strength\"].default_value"
+                props.data_path_item = (
+                    "data.node_tree"
+                    ".nodes[\"" + emission_node.name + "\"]"
+                    ".inputs[\"Strength\"].default_value"
+                )
                 props.header_text = "Light Strength: %.3f"
                 props.input_scale = 0.1
 
@@ -3796,8 +3796,10 @@ class VIEW3D_MT_shading_pie(Menu):
         if context.mode == 'POSE':
             pie.prop(view.overlay, "show_bone_select", icon='XRAY')
         else:
-            xray_active = (context.mode in 'EDIT_MESH') or \
-                          (view.shading.type in {'SOLID', 'WIREFRAME'})
+            xray_active = (
+                (context.mode in 'EDIT_MESH') or
+                (view.shading.type in {'SOLID', 'WIREFRAME'})
+            )
 
             if xray_active:
                 sub = pie



More information about the Bf-blender-cvs mailing list