[Bf-blender-cvs] [c31c539] master: Cleanup: style (80-width)

Campbell Barton noreply at git.blender.org
Tue Mar 22 18:24:16 CET 2016


Commit: c31c53983eb71a7a130689afa8b4292781ebb236
Author: Campbell Barton
Date:   Wed Mar 23 04:25:08 2016 +1100
Branches: master
https://developer.blender.org/rBc31c53983eb71a7a130689afa8b4292781ebb236

Cleanup: style (80-width)

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

M	release/scripts/startup/bl_operators/node.py

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

diff --git a/release/scripts/startup/bl_operators/node.py b/release/scripts/startup/bl_operators/node.py
index d6aeab5..acff259 100644
--- a/release/scripts/startup/bl_operators/node.py
+++ b/release/scripts/startup/bl_operators/node.py
@@ -36,7 +36,8 @@ from bpy.props import (
 class NodeSetting(PropertyGroup):
     value = StringProperty(
             name="Value",
-            description="Python expression to be evaluated as the initial node setting",
+            description="Python expression to be evaluated "
+            "as the initial node setting",
             default="",
             )
 
@@ -68,12 +69,15 @@ class NodeAddOperator:
         # convert mouse position to the View2D for later node placement
         if context.region.type == 'WINDOW':
             # convert mouse position to the View2D for later node placement
-            space.cursor_location_from_region(event.mouse_region_x, event.mouse_region_y)
+            space.cursor_location_from_region(
+                    event.mouse_region_x, event.mouse_region_y)
         else:
             space.cursor_location = tree.view_center
 
-    # XXX explicit node_type argument is usually not necessary, but required to make search operator work:
-    # add_search has to override the 'type' property since it's hardcoded in bpy_operator_wrap.c ...
+    # XXX explicit node_type argument is usually not necessary,
+    # but required to make search operator work:
+    # add_search has to override the 'type' property
+    # since it's hardcoded in bpy_operator_wrap.c ...
     def create_node(self, context, node_type=None):
         space = context.space_data
         tree = space.edit_tree
@@ -94,7 +98,9 @@ class NodeAddOperator:
             try:
                 setattr(node, setting.name, value)
             except AttributeError as e:
-                self.report({'ERROR_INVALID_INPUT'}, "Node has no attribute " + setting.name)
+                self.report(
+                        {'ERROR_INVALID_INPUT'},
+                        "Node has no attribute " + setting.name)
                 print(str(e))
                 # Continue despite invalid attribute
 
@@ -107,7 +113,8 @@ class NodeAddOperator:
     def poll(cls, context):
         space = context.space_data
         # needs active node editor and a tree to add nodes to
-        return (space.type == 'NODE_EDITOR' and space.edit_tree and not space.edit_tree.library)
+        return ((space.type == 'NODE_EDITOR') and
+                space.edit_tree and not space.edit_tree.library)
 
     # Default execute simply adds a node
     def execute(self, context):
@@ -187,7 +194,12 @@ class NODE_OT_add_search(NodeAddOperator, Operator):
             if isinstance(item, nodeitems_utils.NodeItem):
                 nodetype = getattr(bpy.types, item.nodetype, None)
                 if nodetype:
-                    enum_items.append((str(index), item.label, nodetype.bl_rna.description, index))
+                    enum_items.append(
+                            (str(index),
+                             item.label,
+                             nodetype.bl_rna.description,
+                             index,
+                             ))
         return enum_items
 
     # Look up the item based on index
@@ -220,7 +232,8 @@ class NODE_OT_add_search(NodeAddOperator, Operator):
             self.create_node(context, item.nodetype)
 
             if self.use_transform:
-                bpy.ops.node.translate_attach_remove_on_cancel('INVOKE_DEFAULT')
+                bpy.ops.node.translate_attach_remove_on_cancel(
+                        'INVOKE_DEFAULT')
 
             return {'FINISHED'}
         else:
@@ -243,7 +256,8 @@ class NODE_OT_collapse_hide_unused_toggle(Operator):
     def poll(cls, context):
         space = context.space_data
         # needs active node editor and a tree
-        return (space.type == 'NODE_EDITOR' and space.edit_tree and not space.edit_tree.library)
+        return ((space.type == 'NODE_EDITOR') and
+                (space.edit_tree and not space.edit_tree.library))
 
     def execute(self, context):
         space = context.space_data




More information about the Bf-blender-cvs mailing list