Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-03-11 06:19:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-11 06:19:58 +0400
commit34f3dc43e73279cbfa9ebf442d4bd59467d04654 (patch)
treeccc23e21f0099e07a1e87a45b0ed180546a4ea7e /release
parent81aa46efaa7bc9e2b593db91f6738f0de1a402f0 (diff)
code cleanup: pep8 & minor changes
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/console/complete_import.py8
-rw-r--r--release/scripts/presets/keyconfig/3dsmax.py1
-rw-r--r--release/scripts/startup/bl_ui/properties_constraint.py6
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_rigidbody.py2
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py2
-rw-r--r--release/scripts/startup/bl_ui/space_image.py10
-rw-r--r--release/scripts/startup/bl_ui/space_userpref_keymap.py8
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py10
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py10
9 files changed, 28 insertions, 29 deletions
diff --git a/release/scripts/modules/console/complete_import.py b/release/scripts/modules/console/complete_import.py
index 8f2b5324cdc..9277e04af76 100644
--- a/release/scripts/modules/console/complete_import.py
+++ b/release/scripts/modules/console/complete_import.py
@@ -111,10 +111,10 @@ def module_list(path):
else:
folder_list = []
#folder_list = glob.glob(os.path.join(path,'*'))
- folder_list = [p for p in folder_list \
- if os.path.exists(os.path.join(path, p, '__init__.py'))\
- or p[-3:] in ('.py', '.so')\
- or p[-4:] in ('.pyc', '.pyo', '.pyd')]
+ folder_list = [p for p in folder_list \
+ if os.path.exists(os.path.join(path, p, '__init__.py')) \
+ or p[-3:] in {'.py', '.so'} \
+ or p[-4:] in {'.pyc', '.pyo', '.pyd'}]
folder_list = [os.path.basename(p).split('.')[0] for p in folder_list]
return folder_list
diff --git a/release/scripts/presets/keyconfig/3dsmax.py b/release/scripts/presets/keyconfig/3dsmax.py
index 2c39689099b..6a719c2619c 100644
--- a/release/scripts/presets/keyconfig/3dsmax.py
+++ b/release/scripts/presets/keyconfig/3dsmax.py
@@ -1357,4 +1357,3 @@ kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_UP', 'PAGE_UP', 'PRESS', shift
kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_DOWN', 'PAGE_DOWN', 'PRESS', shift=True)
kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_UP', 'WHEELDOWNMOUSE', 'PRESS', shift=True)
kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_DOWN', 'WHEELUPMOUSE', 'PRESS', shift=True)
-
diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py
index 0dfb3071c31..07390525132 100644
--- a/release/scripts/startup/bl_ui/properties_constraint.py
+++ b/release/scripts/startup/bl_ui/properties_constraint.py
@@ -851,16 +851,16 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
- ob = context.object
+ obj = context.object
- if ob.type == 'ARMATURE' and ob.mode in ('EDIT', 'POSE'):
+ if obj.type == 'ARMATURE' and obj.mode in {'EDIT', 'POSE'}:
box = layout.box()
box.alert = True
box.label(icon='INFO', text="See Bone Constraints tab to Add Constraints to active bone")
else:
layout.operator_menu_enum("object.constraint_add", "type", text="Add Object Constraint")
- for con in ob.constraints:
+ for con in obj.constraints:
self.draw_constraint(context, con)
diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
index d7ed7bb4d1a..77ea5a90344 100644
--- a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
+++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py
@@ -109,7 +109,7 @@ class PHYSICS_PT_rigid_body_dynamics(PHYSICS_PT_rigidbody_panel, Panel):
#col = layout.column(align=1)
#col.label(text="Activation:")
- # XXX: settings such as activate on collison/etc.
+ # XXX: settings such as activate on collison/etc.
split = layout.split()
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index 2ad57247996..8a4529863a9 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -36,7 +36,7 @@ def dopesheet_filter(layout, context, genericFiltersOnly=False):
if is_nla:
row.prop(dopesheet, "show_missing_nla", text="")
- else: # graph and dopesheet editors - F-Curves and drivers only
+ else: # graph and dopesheet editors - F-Curves and drivers only
row.prop(dopesheet, "show_only_errors", text="")
if not genericFiltersOnly:
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index c5486dd72d8..e935872e7e7 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -699,11 +699,11 @@ class IMAGE_PT_paint(Panel, ImagePaintPanel):
row = col.row(align=True)
if(brush.use_relative_jitter):
- row.prop(brush, "use_relative_jitter", text="", icon='LOCKED')
- row.prop(brush, "jitter", slider=True)
+ row.prop(brush, "use_relative_jitter", text="", icon='LOCKED')
+ row.prop(brush, "jitter", slider=True)
else:
- row.prop(brush, "use_relative_jitter", text="", icon='UNLOCKED')
- row.prop(brush, "jitter_absolute")
+ row.prop(brush, "use_relative_jitter", text="", icon='UNLOCKED')
+ row.prop(brush, "jitter_absolute")
row.prop(brush, "use_pressure_jitter", toggle=True, text="")
col.prop(brush, "blend", text="Blend")
@@ -726,7 +726,7 @@ class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
col = layout.column()
col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
-
+
brush_texture_settings(col, brush, 0)
diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py
index e800171f61c..4c634378ed2 100644
--- a/release/scripts/startup/bl_ui/space_userpref_keymap.py
+++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py
@@ -215,13 +215,13 @@ class InputKeyMapPanel:
_EVENT_TYPES = set()
_EVENT_TYPE_MAP = {}
+
def draw_filtered(self, display_keymaps, filter_type, filter_text, layout):
if filter_type == 'NAME':
def filter_func(kmi):
return (filter_text in kmi.idname.lower() or
filter_text in kmi.name.lower())
-
else:
if not self._EVENT_TYPES:
enum = bpy.types.Event.bl_rna.properties["type"].enum_items
@@ -272,13 +272,13 @@ class InputKeyMapPanel:
return False
elif filter_text_split:
kmi_type = filter_text_split[0].upper()
-
+
if kmi_type not in self._EVENT_TYPES:
# replacement table
kmi_type_test = self._EVENT_TYPE_MAP.get(kmi_type)
if kmi_type_test is None:
# print("Unknown Type:", kmi_type)
-
+
# Partial match
for k, v in self._EVENT_TYPE_MAP.items():
if kmi_type in k:
@@ -293,7 +293,7 @@ class InputKeyMapPanel:
kmi_type = kmi_type_test
del kmi_type_test
-
+
kmi_test_dict["type"] = kmi_type
# main filter func, runs many times
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 37f7cf65403..29d14097b8c 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2520,29 +2520,29 @@ class VIEW3D_PT_view3d_meshdisplay(Panel):
mesh = context.active_object.data
split = layout.split()
-
+
col = split.column()
col.label(text="Overlays:")
col.prop(mesh, "show_faces", text="Faces")
col.prop(mesh, "show_edges", text="Edges")
col.prop(mesh, "show_edge_crease", text="Creases")
-
+
col = split.column()
col.label()
col.prop(mesh, "show_edge_seams", text="Seams")
col.prop(mesh, "show_edge_sharp", text="Sharp")
col.prop(mesh, "show_edge_bevel_weight", text="Weights")
-
+
col = layout.column()
col.separator()
col.label(text="Normals:")
row = col.row()
-
+
sub = row.row(align=True)
sub.prop(mesh, "show_normal_vertex", text="", icon='VERTEXSEL')
sub.prop(mesh, "show_normal_face", text="", icon='FACESEL')
-
+
sub = row.row(align=True)
sub.active = mesh.show_normal_vertex or mesh.show_normal_face
sub.prop(context.scene.tool_settings, "normal_size", text="Size")
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 3bd2f642e0b..54e5741a142 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -685,7 +685,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
row.prop(brush, "use_relative_jitter", text="", icon='UNLOCKED')
row.prop(brush, "jitter_absolute")
row.prop(brush, "use_pressure_jitter", toggle=True, text="")
-
+
col.prop(brush, "blend", text="Blend")
col = layout.column()
@@ -712,11 +712,11 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
row = col.row(align=True)
if(brush.use_relative_jitter):
- row.prop(brush, "use_relative_jitter", text="", icon='LOCKED')
- row.prop(brush, "jitter", slider=True)
+ row.prop(brush, "use_relative_jitter", text="", icon='LOCKED')
+ row.prop(brush, "jitter", slider=True)
else:
- row.prop(brush, "use_relative_jitter", text="", icon='UNLOCKED')
- row.prop(brush, "jitter_absolute")
+ row.prop(brush, "use_relative_jitter", text="", icon='UNLOCKED')
+ row.prop(brush, "jitter_absolute")
row.prop(brush, "use_pressure_jitter", toggle=True, text="")
col.prop(brush, "vertex_tool", text="Blend")