diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-28 23:33:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-28 23:33:14 +0400 |
commit | 8e3d590b76222c332d40dfeca81d899e1df5c503 (patch) | |
tree | 84bc1ca0b6e645d463034594dd76814d9121c9f0 /release/scripts/startup/bl_operators | |
parent | 8fce915b6e6b008e89696c7ff96355d9a1f2ccf1 (diff) |
code cleanup: python/pep8 and double-promotion warnings.
Diffstat (limited to 'release/scripts/startup/bl_operators')
-rw-r--r-- | release/scripts/startup/bl_operators/node.py | 6 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/rigidbody.py | 6 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/release/scripts/startup/bl_operators/node.py b/release/scripts/startup/bl_operators/node.py index 5c7f3c3f4b2..c9063436bb3 100644 --- a/release/scripts/startup/bl_operators/node.py +++ b/release/scripts/startup/bl_operators/node.py @@ -127,7 +127,8 @@ def node_class_items_iter(node_class, context): tree_idname = context.space_data.edit_tree.bl_idname for group in bpy.data.node_groups: if group.bl_idname == tree_idname: - yield (group.name, "", {"node_tree":group}) # XXX empty string should be replaced by description from tree + # XXX empty string should be replaced by description from tree + yield (group.name, "", {"node_tree": group}) else: yield (node_class.bl_rna.name, node_class.bl_rna.description, {}) @@ -169,7 +170,7 @@ class NODE_OT_add_search(NodeAddOperator, Operator): for index, item in enumerate(node_items_iter(context)): if str(index) == self.type: node = self.create_node(context, item[0].bl_rna.identifier) - for prop,value in item[3].items(): + for prop, value in item[3].items(): setattr(node, prop, value) break return {'FINISHED'} @@ -257,4 +258,3 @@ class NODE_OT_tree_path_parent(Operator): space.path.pop() return {'FINISHED'} - diff --git a/release/scripts/startup/bl_operators/rigidbody.py b/release/scripts/startup/bl_operators/rigidbody.py index f327c602fb6..80516a85d43 100644 --- a/release/scripts/startup/bl_operators/rigidbody.py +++ b/release/scripts/startup/bl_operators/rigidbody.py @@ -146,7 +146,7 @@ class BakeToKeyframes(Operator): # this is a little roundabout but there's no better way right now aa = mat.to_quaternion().to_axis_angle() obj.rotation_axis_angle = (aa[1], ) + aa[0][:] - else: # euler + else: # euler # make sure euler rotation is compatible to previous frame obj.rotation_euler = mat.to_euler(rot_mode, obj_prev.rotation_euler) @@ -275,10 +275,10 @@ class ConnectRigidBodies(Operator): self._add_constraint(context, objs_sorted[i-1], objs_sorted[i]) change = True - else: # SELECTED_TO_ACTIVE + else: # SELECTED_TO_ACTIVE for obj in objects: self._add_constraint(context, obj_act, obj) - change = True; + change = True if change: # restore selection diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index bb17f5979be..660faecc564 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -830,7 +830,7 @@ def _wm_doc_get_id(doc_id, do_url=True, url_prefix=""): rna = "bpy.ops.%s.%s" % (class_name, class_prop) else: rna_class = getattr(bpy.types, class_name) - + # an operator setting (selected from a running operator), rare case # note: Py defined operators are subclass of Operator, # C defined operators are subclass of OperatorProperties. |