Cleanup: line length
authorCampbell Barton <ideasman42@gmail.com>
Tue, 29 Jan 2019 22:03:37 +0000 (09:03 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 29 Jan 2019 22:06:44 +0000 (09:06 +1100)
15 files changed:
release/scripts/modules/bpy_extras/node_shader_utils.py
release/scripts/modules/rna_info.py
release/scripts/presets/keyconfig/keymap_data/blender_default.py
release/scripts/startup/bl_operators/file.py
release/scripts/startup/bl_operators/object.py
release/scripts/startup/bl_operators/uvcalc_smart_project.py
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/properties_constraint.py
release/scripts/startup/bl_ui/properties_grease_pencil_common.py
release/scripts/startup/bl_ui/space_dopesheet.py
release/scripts/startup/bl_ui/space_node.py
release/scripts/startup/bl_ui/space_toolsystem_common.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
release/scripts/templates_py/ui_list_simple.py

index 393695bc8ceaffeb4b96bed10fb0c18cf3a2a70b..67dfe92152e91a3aaa78442d9a2d4f2390017ae8 100644 (file)
@@ -476,8 +476,6 @@ class PrincipledBSDFWrapper(ShaderWrapper):
 
     normalmap_texture = property(normalmap_texture_get)
 
-
-
 class ShaderImageTextureWrapper():
     """
     Generic 'image texture'-like wrapper, handling image node, some mapping (texture coordinates transformations),
index 490aae1c64060eb475a65508810d532044283c1d..4a2b1085143d0abc00da3dd4635a020d1e3d138d 100644 (file)
@@ -747,7 +747,12 @@ def BuildRNAInfo():
 
     # for rna_info in InfoStructRNA.global_lookup.values():
     #     print(rna_info)
-    return InfoStructRNA.global_lookup, InfoFunctionRNA.global_lookup, InfoOperatorRNA.global_lookup, InfoPropertyRNA.global_lookup
+    return (
+        InfoStructRNA.global_lookup,
+        InfoFunctionRNA.global_lookup,
+        InfoOperatorRNA.global_lookup,
+        InfoPropertyRNA.global_lookup,
+    )
 
 
 def main():
index 6a701aa26079699ff3b095f3c03c4b4b5dc1940f..0ba59dd4fc035e2dd4fc82fe899ccd611f8c1a28 100644 (file)
@@ -5128,7 +5128,6 @@ def km_node_editor_tool_links_cut(params):
     )
 
 
-
 def km_3d_view_tool_cursor(params):
     return (
         "3D View Tool: Cursor",
index c00c4214ebc6c5e5ceef931115804a47a80b91d2..5a127cf2fe337b3345453e49e37e99cdff64d18f 100644 (file)
@@ -251,7 +251,8 @@ class WM_OT_previews_batch_clear(Operator):
 
 
 class WM_OT_blend_strings_utf8_validate(Operator):
-    """Check and fix all strings in current .blend file to be valid UTF-8 Unicode (needed for some old, 2.4x area files)"""
+    """Check and fix all strings in current .blend file to be valid UTF-8 Unicode """ \
+    """(needed for some old, 2.4x area files)"""
     bl_idname = "wm.blend_strings_utf8_validate"
     bl_label = "Validate .blend strings"
     bl_options = {'REGISTER'}
index c945d15267ae3927a636858bd383663e41489b55..42db2ca337d31870912308aad6a8cb310b378aa7 100644 (file)
@@ -953,7 +953,8 @@ class LoadReferenceImage(LoadImageAsEmpty, Operator):
 
 
 class OBJECT_OT_assign_property_defaults(Operator):
-    """Assign the current values of custom properties as their defaults, for use as part of the rest pose state in NLA track mixing"""
+    """Assign the current values of custom properties as their defaults, """ \
+    """for use as part of the rest pose state in NLA track mixing"""
     bl_idname = "object.assign_property_defaults"
     bl_label = "Assign Custom Property Values as Default"
     bl_options = {'UNDO', 'REGISTER'}
index 7097613b88f17e564a7b2f2b31aab17aa1c102bb..6eb07d5c19fb248ac18f34cc0657ef68b7f09943 100644 (file)
@@ -803,7 +803,8 @@ def main(context,
         if not meshFaces:
             continue
 
-        # Smallest first is slightly more efficient, but if the user cancels early then its better we work on the larger data.
+        # Smallest first is slightly more efficient,
+        # but if the user cancels early then its better we work on the larger data.
 
         # Generate Projection Vecs
         # 0d is   1.0
@@ -812,7 +813,9 @@ def main(context,
         # Initialize projectVecs
         if USER_VIEW_INIT:
             # Generate Projection
-            projectVecs = [Vector(Window.GetViewVector()) @ ob.matrix_world.inverted().to_3x3()]  # We add to this along the way
+
+            # We add to this along the way
+            projectVecs = [Vector(Window.GetViewVector()) @ ob.matrix_world.inverted().to_3x3()]
         else:
             projectVecs = []
 
index ee669d172371a5c202557309a1281cc5e9d6d0e3..b9438c275a4d22eb2c2acc98a2c2a5d6a72c551d 100644 (file)
@@ -2170,11 +2170,8 @@ class WM_OT_addon_remove(Operator):
         addon_utils.disable(self.module, default_set=True)
 
         import shutil
-        if isdir:
-            if os.path.islink(path):
-                os.remove(path)
-            else:
-                shutil.rmtree(path)
+        if isdir and (not os.path.islink(path)):
+            shutil.rmtree(path)
         else:
             os.remove(path)
 
index 144e1dc2af69136f8c5b6db8f4ea7f30a6c5f48b..b19360eb524368cb30c6435bcbb16b49855643d2 100644 (file)
@@ -68,7 +68,8 @@ class ConstraintButtonsPanel:
                     row = layout.row(align=True)
                     row.label(text="Head/Tail:")
                     row.prop(con, "head_tail", text="")
-                    row.prop(con, "use_bbone_shape", text="", icon='IPO_BEZIER')  # XXX icon, and only when bone has segments?
+                    # XXX icon, and only when bone has segments?
+                    row.prop(con, "use_bbone_shape", text="", icon='IPO_BEZIER')
             elif con.target.type in {'MESH', 'LATTICE'}:
                 layout.prop_search(con, "subtarget", con.target, "vertex_groups", text="Vertex Group")
 
index 49f857492f3515d37cf693b25d78f60aa915f2d8..b5937388634e0e76ea3e8812c459c9c12bf9e587 100644 (file)
@@ -100,7 +100,8 @@ class AnnotationDrawingToolsPanel:
         col.label(text="Draw:")
         row = col.row(align=True)
         row.operator("gpencil.annotate", icon='GREASEPENCIL', text="Draw").mode = 'DRAW'
-        row.operator("gpencil.annotate", icon='FORCE_CURVE', text="Erase").mode = 'ERASER'  # XXX: Needs a dedicated icon
+        # XXX: Needs a dedicated icon
+        row.operator("gpencil.annotate", icon='FORCE_CURVE', text="Erase").mode = 'ERASER'
 
         row = col.row(align=True)
         row.operator("gpencil.annotate", icon='LINE_DATA', text="Line").mode = 'DRAW_STRAIGHT'
index f0f8cf1028d9d34f3f7cc5a50563893baf4b9aec..506a4f3a242149cf59cf34c2a9398e7695a5f7f6 100644 (file)
@@ -240,7 +240,8 @@ class DOPESHEET_HT_editor_buttons(Header):
         tool_settings = context.tool_settings
 
         if st.mode in {'ACTION', 'SHAPEKEY'}:
-            # TODO: These buttons need some tidying up - Probably by using a popover, and bypassing the template_id() here
+            # TODO: These buttons need some tidying up -
+            # Probably by using a popover, and bypassing the template_id() here
             row = layout.row(align=True)
             row.operator("action.layer_prev", text="", icon='TRIA_DOWN')
             row.operator("action.layer_next", text="", icon='TRIA_UP')
index e5e6b6c32816816ae14b6913b29527876414266a..c9930a66144391f7e65c566db29918a59dbc8ff0 100644 (file)
@@ -444,7 +444,8 @@ class NODE_PT_active_node_properties(Panel):
         elif hasattr(node, "draw_buttons"):
             node.draw_buttons(context, layout)
 
-        # XXX this could be filtered further to exclude socket types which don't have meaningful input values (e.g. cycles shader)
+        # XXX this could be filtered further to exclude socket types
+        # which don't have meaningful input values (e.g. cycles shader)
         value_inputs = [socket for socket in node.inputs if socket.enabled and not socket.is_linked]
         if value_inputs:
             layout.separator()
index 4d6a43aa141c046eeaf01ba9a6d726ca811e4674..24e913a23233559acd901c8ac7648668e78631f4 100644 (file)
@@ -451,9 +451,13 @@ class ToolSelectPanelHelper:
                 column_count = 1
 
         if column_count == 1:
-            ui_gen = ToolSelectPanelHelper._layout_generator_single_column(layout, scale_y=scale_y)
+            ui_gen = ToolSelectPanelHelper._layout_generator_single_column(
+                layout, scale_y=scale_y,
+            )
         else:
-            ui_gen = ToolSelectPanelHelper._layout_generator_multi_columns(layout, column_count=column_count, scale_y=scale_y)
+            ui_gen = ToolSelectPanelHelper._layout_generator_multi_columns(
+                layout, column_count=column_count, scale_y=scale_y,
+            )
 
         return ui_gen, show_text
 
index ccc7d5bdfd2032a1bda444a7fc901d11b5276678..459836bf003e27876a0c0e47a94960d76ffe6a84 100644 (file)
@@ -4308,7 +4308,9 @@ class VIEW3D_PT_collections(Panel):
             subrow = sub.row()
             subrow.alignment = 'LEFT'
             subrow.active = has_visible_objects
-            subrow.operator("object.hide_collection", text=child.name, icon=icon, emboss=False).collection_index = index
+            subrow.operator(
+                "object.hide_collection", text=child.name, icon=icon, emboss=False,
+            ).collection_index = index
 
             sub = row.split()
             subrow = sub.row(align=True)
index 321e61ac092146bad3db876b51113637bacc5cc8..2155db9e7221d63698c00d8174746402ef6ddfeb 100644 (file)
@@ -614,7 +614,10 @@ class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel):
         sub = row.row(align=True)
         sub.prop(brush, "cursor_overlay_alpha", text="Curve Alpha")
         sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
-        row.prop(brush, "use_cursor_overlay", text="", toggle=True, icon='HIDE_OFF' if brush.use_cursor_overlay else 'HIDE_ON')
+        row.prop(
+            brush, "use_cursor_overlay", text="", toggle=True,
+            icon='HIDE_OFF' if brush.use_cursor_overlay else 'HIDE_ON',
+        )
 
         col.active = brush.brush_capabilities.has_overlay
 
@@ -625,7 +628,10 @@ class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel):
             sub.prop(brush, "texture_overlay_alpha", text="Texture Alpha")
             sub.prop(brush, "use_primary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
             if tex_slot.map_mode != 'STENCIL':
-                row.prop(brush, "use_primary_overlay", text="", toggle=True, icon='HIDE_OFF' if brush.use_primary_overlay else 'HIDE_ON')
+                row.prop(
+                    brush, "use_primary_overlay", text="", toggle=True,
+                    icon='HIDE_OFF' if brush.use_primary_overlay else 'HIDE_ON',
+                )
 
         if context.image_paint_object:
             row = col.row(align=True)
@@ -634,7 +640,10 @@ class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel):
             sub.prop(brush, "mask_overlay_alpha", text="Mask Texture Alpha")
             sub.prop(brush, "use_secondary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
             if tex_slot_mask.map_mode != 'STENCIL':
-                row.prop(brush, "use_secondary_overlay", text="", toggle=True, icon='HIDE_OFF' if brush.use_secondary_overlay else 'HIDE_ON')
+                row.prop(
+                    brush, "use_secondary_overlay", text="", toggle=True,
+                    icon='HIDE_OFF' if brush.use_secondary_overlay else 'HIDE_ON',
+                )
 
 
 # TODO, move to space_view3d.py
index 79c14c17c7e934f4fbe7fe22a39ad658e6ad2ea9..ac3f2b984de74f10a8d7d8947ada7fa11fbb560e 100644 (file)
@@ -53,7 +53,8 @@ class UIListPanelExample(bpy.types.Panel):
         # with no custom draw code, use "UI_UL_list").
         layout.template_list("MATERIAL_UL_matslots_example", "", obj, "material_slots", obj, "active_material_index")
 
-        # The second one can usually be left as an empty string. It's an additional ID used to distinguish lists in case you
+        # The second one can usually be left as an empty string.
+        # It's an additional ID used to distinguish lists in case you
         # use the same list several times in a given area.
         layout.template_list("MATERIAL_UL_matslots_example", "compact", obj, "material_slots",
                              obj, "active_material_index", type='COMPACT')