diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-26 20:41:37 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-26 20:58:56 +0300 |
commit | 532c8ac58384309e77791e32ab78f448ad2a76a6 (patch) | |
tree | cef77b98714aaed13ec8317bc9bb763d00aa1a02 /release/scripts/startup/bl_operators/node.py | |
parent | ecb56eac57e66c1c925860e05438c9f245bff505 (diff) |
Cleanup: pep8 function indentation
Diffstat (limited to 'release/scripts/startup/bl_operators/node.py')
-rw-r--r-- | release/scripts/startup/bl_operators/node.py | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/release/scripts/startup/bl_operators/node.py b/release/scripts/startup/bl_operators/node.py index 40876e2b069..bb8f991e526 100644 --- a/release/scripts/startup/bl_operators/node.py +++ b/release/scripts/startup/bl_operators/node.py @@ -35,31 +35,31 @@ from bpy.props import ( class NodeSetting(PropertyGroup): value = StringProperty( - name="Value", - description="Python expression to be evaluated " - "as the initial node setting", - default="", - ) + name="Value", + description="Python expression to be evaluated " + "as the initial node setting", + default="", + ) # Base class for node 'Add' operators class NodeAddOperator: type = StringProperty( - name="Node Type", - description="Node type", - ) + name="Node Type", + description="Node type", + ) use_transform = BoolProperty( - name="Use Transform", - description="Start transform operator after inserting the node", - default=False, - ) + name="Use Transform", + description="Start transform operator after inserting the node", + default=False, + ) settings = CollectionProperty( - name="Settings", - description="Settings to be applied on the newly created node", - type=NodeSetting, - options={'SKIP_SAVE'}, - ) + name="Settings", + description="Settings to be applied on the newly created node", + type=NodeSetting, + options={'SKIP_SAVE'}, + ) @staticmethod def store_mouse_cursor(context, event): @@ -70,7 +70,7 @@ class NodeAddOperator: 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) + event.mouse_region_x, event.mouse_region_y) else: space.cursor_location = tree.view_center @@ -99,8 +99,8 @@ class NodeAddOperator: setattr(node, setting.name, value) except AttributeError as e: self.report( - {'ERROR_INVALID_INPUT'}, - "Node has no attribute " + setting.name) + {'ERROR_INVALID_INPUT'}, + "Node has no attribute " + setting.name) print(str(e)) # Continue despite invalid attribute @@ -153,9 +153,9 @@ class NODE_OT_add_and_link_node(NodeAddOperator, Operator): bl_options = {'REGISTER', 'UNDO'} link_socket_index = IntProperty( - name="Link Socket Index", - description="Index of the socket to link", - ) + name="Link Socket Index", + description="Index of the socket to link", + ) def execute(self, context): space = context.space_data @@ -195,11 +195,11 @@ class NODE_OT_add_search(NodeAddOperator, Operator): nodetype = getattr(bpy.types, item.nodetype, None) if nodetype: enum_items.append( - (str(index), - item.label, - nodetype.bl_rna.description, - index, - )) + (str(index), + item.label, + nodetype.bl_rna.description, + index, + )) return enum_items # Look up the item based on index @@ -211,10 +211,10 @@ class NODE_OT_add_search(NodeAddOperator, Operator): return None node_item = EnumProperty( - name="Node Type", - description="Node type", - items=node_enum_items, - ) + name="Node Type", + description="Node type", + items=node_enum_items, + ) def execute(self, context): item = self.find_node_item(context) @@ -233,7 +233,7 @@ class NODE_OT_add_search(NodeAddOperator, Operator): if self.use_transform: bpy.ops.node.translate_attach_remove_on_cancel( - 'INVOKE_DEFAULT') + 'INVOKE_DEFAULT') return {'FINISHED'} else: |