[Bf-blender-cvs] [7894d6c6f19] master: Cleanup: line length

Campbell Barton noreply at git.blender.org
Tue Jan 29 23:05:05 CET 2019


Commit: 7894d6c6f1982f58dc479f3f01dd79afb6f5c1a0
Author: Campbell Barton
Date:   Wed Jan 30 09:03:37 2019 +1100
Branches: master
https://developer.blender.org/rB7894d6c6f1982f58dc479f3f01dd79afb6f5c1a0

Cleanup: line length

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

M	release/scripts/modules/bpy_extras/node_shader_utils.py
M	release/scripts/modules/rna_info.py
M	release/scripts/presets/keyconfig/keymap_data/blender_default.py
M	release/scripts/startup/bl_operators/file.py
M	release/scripts/startup/bl_operators/object.py
M	release/scripts/startup/bl_operators/uvcalc_smart_project.py
M	release/scripts/startup/bl_operators/wm.py
M	release/scripts/startup/bl_ui/properties_constraint.py
M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M	release/scripts/startup/bl_ui/space_dopesheet.py
M	release/scripts/startup/bl_ui/space_node.py
M	release/scripts/startup/bl_ui/space_toolsystem_common.py
M	release/scripts/startup/bl_ui/space_view3d.py
M	release/scripts/startup/bl_ui/space_view3d_toolbar.py
M	release/scripts/templates_py/ui_list_simple.py

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

diff --git a/release/scripts/modules/bpy_extras/node_shader_utils.py b/release/scripts/modules/bpy_extras/node_shader_utils.py
index 393695bc8ce..67dfe92152e 100644
--- a/release/scripts/modules/bpy_extras/node_shader_utils.py
+++ b/release/scripts/modules/bpy_extras/node_shader_utils.py
@@ -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),
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py
index 490aae1c640..4a2b1085143 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -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():
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 6a701aa2607..0ba59dd4fc0 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -5128,7 +5128,6 @@ def km_node_editor_tool_links_cut(params):
     )
 
 
-
 def km_3d_view_tool_cursor(params):
     return (
         "3D View Tool: Cursor",
diff --git a/release/scripts/startup/bl_operators/file.py b/release/scripts/startup/bl_operators/file.py
index c00c4214ebc..5a127cf2fe3 100644
--- a/release/scripts/startup/bl_operators/file.py
+++ b/release/scripts/startup/bl_operators/file.py
@@ -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'}
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py
index c945d15267a..42db2ca337d 100644
--- a/release/scripts/startup/bl_operators/object.py
+++ b/release/scripts/startup/bl_operators/object.py
@@ -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'}
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
index 7097613b88f..6eb07d5c19f 100644
--- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py
+++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
@@ -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 = []
 
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index ee669d17237..b9438c275a4 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -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)
 
diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py
index 144e1dc2af6..b19360eb524 100644
--- a/release/scripts/startup/bl_ui/properties_constraint.py
+++ b/release/scripts/startup/bl_ui/properties_constraint.py
@@ -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")
 
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index 49f857492f3..b5937388634 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -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'
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index f0f8cf1028d..506a4f3a242 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -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')
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index e5e6b6c3281..c9930a66144 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -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()
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py
index 4d6a43aa141..24e913a2323 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_common.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py
@@ -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
 
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index ccc7d5bdfd2..459836bf003 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -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 = inde

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list