diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-17 21:57:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-17 21:57:20 +0400 |
commit | 391a214303ed7d7307b8c26496d00607a1b34814 (patch) | |
tree | 49acedfee77fb086e005cbfc70199cf5c92e70b9 /release/scripts/startup/bl_ui | |
parent | 21b5dea29b513be759789048b178f18ab6e53a6e (diff) |
pep8 edits, also remove unused vars
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_game.py | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_render.py | 6 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_image.py | 20 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_time.py | 16 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 38 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 47 |
6 files changed, 64 insertions, 65 deletions
diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py index f0f964f9a31..9f2b3367feb 100644 --- a/release/scripts/startup/bl_ui/properties_game.py +++ b/release/scripts/startup/bl_ui/properties_game.py @@ -287,7 +287,7 @@ class RENDER_PT_game_player(RenderButtonsPanel, Panel): col = row.column() col.prop(gs, "use_desktop") col.active = gs.show_fullscreen - + col = layout.column() col.label(text="Quality:") col.prop(gs, "samples") diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 895c3611d86..fea7b9673ec 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -418,9 +418,9 @@ class RENDER_PT_stamp(RenderButtonsPanel, Panel): rd = context.scene.render layout.active = rd.use_stamp - + layout.prop(rd, "stamp_font_size", text="Font Size") - + row = layout.row() row.column().prop(rd, "stamp_foreground", slider=True) row.column().prop(rd, "stamp_background", slider=True) @@ -433,7 +433,7 @@ class RENDER_PT_stamp(RenderButtonsPanel, Panel): col.prop(rd, "use_stamp_render_time", text="RenderTime") col.prop(rd, "use_stamp_frame", text="Frame") col.prop(rd, "use_stamp_scene", text="Scene") - + col = split.column() col.prop(rd, "use_stamp_camera", text="Camera") col.prop(rd, "use_stamp_lens", text="Lens") diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index a7999bac971..7f35ae21dfb 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -706,8 +706,8 @@ class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, Panel): def draw(self, context): layout = self.layout - settings = context.tool_settings.image_paint - brush = settings.brush + toolsettings = context.tool_settings.image_paint + brush = toolsettings.brush layout.prop(brush, "image_tool", text="") @@ -823,18 +823,16 @@ class IMAGE_UV_sculpt(bpy.types.Panel): split = layout.split() col = split.column() - col.prop(context.tool_settings, "uv_sculpt_lock_borders"); - col.prop(context.tool_settings, "uv_sculpt_all_islands"); - + col.prop(toolsettings, "uv_sculpt_lock_borders") + col.prop(toolsettings, "uv_sculpt_all_islands") + split = layout.split() col = split.column() - col.prop(context.tool_settings, "uv_sculpt_tool"); - - if context.tool_settings.uv_sculpt_tool == 'RELAX': - col.prop(context.tool_settings, "uv_relax_method"); - - + col.prop(toolsettings, "uv_sculpt_tool") + + if toolsettings.uv_sculpt_tool == 'RELAX': + col.prop(toolsettings, "uv_relax_method") if __name__ == "__main__": # only for live edit. diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py index bb0e8cfdae5..7720fddb084 100644 --- a/release/scripts/startup/bl_ui/space_time.py +++ b/release/scripts/startup/bl_ui/space_time.py @@ -28,7 +28,7 @@ class TIME_HT_header(Header): layout = self.layout scene = context.scene - tools = context.tool_settings + toolsettings = context.tool_settings screen = context.screen row = layout.row(align=True) @@ -80,11 +80,11 @@ class TIME_HT_header(Header): layout.separator() row = layout.row(align=True) - row.prop(tools, "use_keyframe_insert_auto", text="", toggle=True) - row.prop(tools, "use_keyframe_insert_keyingset", text="", toggle=True) - if screen.is_animation_playing and tools.use_keyframe_insert_auto: + row.prop(toolsettings, "use_keyframe_insert_auto", text="", toggle=True) + row.prop(toolsettings, "use_keyframe_insert_keyingset", text="", toggle=True) + if screen.is_animation_playing and toolsettings.use_keyframe_insert_auto: subsub = row.row() - subsub.prop(tools, "use_record_with_nla", toggle=True) + subsub.prop(toolsettings, "use_record_with_nla", toggle=True) row = layout.row(align=True) row.prop_search(scene.keying_sets_all, "active", scene, "keying_sets_all", text="") @@ -193,10 +193,10 @@ class TIME_MT_autokey(Menu): def draw(self, context): layout = self.layout - tools = context.tool_settings + toolsettings = context.tool_settings - layout.prop_enum(tools, "auto_keying_mode", 'ADD_REPLACE_KEYS') - layout.prop_enum(tools, "auto_keying_mode", 'REPLACE_KEYS') + layout.prop_enum(toolsettings, "auto_keying_mode", 'ADD_REPLACE_KEYS') + layout.prop_enum(toolsettings, "auto_keying_mode", 'REPLACE_KEYS') def marker_menu_generic(layout): diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 715a90bd7ec..1dba79b34d7 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -761,7 +761,7 @@ class VIEW3D_MT_object_clear(Menu): layout.operator("object.location_clear", text="Location") layout.operator("object.rotation_clear", text="Rotation") layout.operator("object.scale_clear", text="Scale") - layout ("object.origin_clear", text="Origin") + layout.operator("object.origin_clear", text="Origin") class VIEW3D_MT_object_specials(Menu): @@ -1110,9 +1110,9 @@ class VIEW3D_MT_sculpt(Menu): def draw(self, context): layout = self.layout - tool_settings = context.tool_settings - sculpt = tool_settings.sculpt - brush = tool_settings.sculpt.brush + toolsettings = context.tool_settings + sculpt = toolsettings.sculpt + brush = toolsettings.sculpt.brush layout.operator("ed.undo") layout.operator("ed.redo") @@ -1148,8 +1148,8 @@ class VIEW3D_MT_sculpt(Menu): layout.prop(sculpt, "show_brush") # TODO, make available from paint menu! - layout.prop(tool_settings, "sculpt_paint_use_unified_size", text="Unify Size") - layout.prop(tool_settings, "sculpt_paint_use_unified_strength", text="Unify Strength") + layout.prop(toolsettings, "sculpt_paint_use_unified_size", text="Unify Size") + layout.prop(toolsettings, "sculpt_paint_use_unified_strength", text="Unify Strength") # ********** Particle menu ********** @@ -1453,7 +1453,7 @@ class VIEW3D_MT_edit_mesh(Menu): def draw(self, context): layout = self.layout - settings = context.tool_settings + toolsettings = context.tool_settings layout.operator("ed.undo") layout.operator("ed.redo") @@ -1485,9 +1485,9 @@ class VIEW3D_MT_edit_mesh(Menu): layout.separator() - layout.prop(settings, "use_mesh_automerge") - layout.prop_menu_enum(settings, "proportional_edit") - layout.prop_menu_enum(settings, "proportional_edit_falloff") + layout.prop(toolsettings, "use_mesh_automerge") + layout.prop_menu_enum(toolsettings, "proportional_edit") + layout.prop_menu_enum(toolsettings, "proportional_edit_falloff") layout.separator() @@ -1718,7 +1718,7 @@ class VIEW3D_MT_edit_mesh_showhide(ShowHideMenu, Menu): def draw_curve(self, context): layout = self.layout - settings = context.tool_settings + toolsettings = context.tool_settings layout.menu("VIEW3D_MT_transform") layout.menu("VIEW3D_MT_mirror") @@ -1740,8 +1740,8 @@ def draw_curve(self, context): layout.separator() - layout.prop_menu_enum(settings, "proportional_edit") - layout.prop_menu_enum(settings, "proportional_edit_falloff") + layout.prop_menu_enum(toolsettings, "proportional_edit") + layout.prop_menu_enum(toolsettings, "proportional_edit_falloff") layout.separator() @@ -1870,7 +1870,7 @@ class VIEW3D_MT_edit_meta(Menu): def draw(self, context): layout = self.layout - settings = context.tool_settings + toolsettings = context.tool_settings layout.operator("ed.undo") layout.operator("ed.redo") @@ -1889,8 +1889,8 @@ class VIEW3D_MT_edit_meta(Menu): layout.separator() - layout.prop_menu_enum(settings, "proportional_edit") - layout.prop_menu_enum(settings, "proportional_edit_falloff") + layout.prop_menu_enum(toolsettings, "proportional_edit") + layout.prop_menu_enum(toolsettings, "proportional_edit_falloff") layout.separator() @@ -1914,7 +1914,7 @@ class VIEW3D_MT_edit_lattice(Menu): def draw(self, context): layout = self.layout - settings = context.tool_settings + toolsettings = context.tool_settings layout.menu("VIEW3D_MT_transform") layout.menu("VIEW3D_MT_mirror") @@ -1926,8 +1926,8 @@ class VIEW3D_MT_edit_lattice(Menu): layout.separator() - layout.prop_menu_enum(settings, "proportional_edit") - layout.prop_menu_enum(settings, "proportional_edit_falloff") + layout.prop_menu_enum(toolsettings, "proportional_edit") + layout.prop_menu_enum(toolsettings, "proportional_edit_falloff") class VIEW3D_MT_edit_armature(Menu): diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 248452a0e8c..95af67b9d3a 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -453,18 +453,18 @@ class PaintPanel(): @staticmethod def paint_settings(context): - ts = context.tool_settings + toolsettings = context.tool_settings if context.sculpt_object: - return ts.sculpt + return toolsettings.sculpt elif context.vertex_paint_object: - return ts.vertex_paint + return toolsettings.vertex_paint elif context.weight_paint_object: - return ts.weight_paint + return toolsettings.weight_paint elif context.image_paint_object: - return ts.image_paint + return toolsettings.image_paint elif context.particle_edit_object: - return ts.particle_edit + return toolsettings.particle_edit return None @@ -487,6 +487,7 @@ class PaintPanel(): ptr = ups if ups.use_unified_strength else brush parent.prop(ptr, prop_name, icon=icon, text=text, slider=slider) + class VIEW3D_PT_tools_brush(PaintPanel, Panel): bl_label = "Brush" @@ -497,6 +498,7 @@ class VIEW3D_PT_tools_brush(PaintPanel, Panel): def draw(self, context): layout = self.layout + toolsettings = context.tool_settings settings = self.paint_settings(context) brush = settings.brush @@ -541,7 +543,7 @@ class VIEW3D_PT_tools_brush(PaintPanel, Panel): row = col.row(align=True) - ups = context.tool_settings.unified_paint_settings + ups = toolsettings.unified_paint_settings if ((ups.use_unified_size and ups.use_locked_size) or ((not ups.use_unified_size) and brush.use_locked_size)): self.prop_unified_size(row, context, brush, "use_locked_size", icon='LOCKED') @@ -675,9 +677,9 @@ class VIEW3D_PT_tools_brush(PaintPanel, Panel): # Weight Paint Mode # elif context.weight_paint_object and brush: - layout.prop(context.tool_settings, "vertex_group_weight", text="Weight", slider=True) - layout.prop(context.tool_settings, "use_auto_normalize", text="Auto Normalize") - layout.prop(context.tool_settings, "use_multipaint", text="Multi-Paint") + layout.prop(toolsettings, "vertex_group_weight", text="Weight", slider=True) + layout.prop(toolsettings, "use_auto_normalize", text="Auto Normalize") + layout.prop(toolsettings, "use_multipaint", text="Multi-Paint") col = layout.column() @@ -956,8 +958,8 @@ class VIEW3D_PT_sculpt_options(PaintPanel, Panel): def draw(self, context): layout = self.layout - tool_settings = context.tool_settings - sculpt = tool_settings.sculpt + toolsettings = context.tool_settings + sculpt = toolsettings.sculpt layout.label(text="Lock:") row = layout.row(align=True) @@ -1003,11 +1005,11 @@ class VIEW3D_PT_tools_brush_appearance(PaintPanel, Panel): @classmethod def poll(cls, context): - ts = context.tool_settings - return ((context.sculpt_object and ts.sculpt) or - (context.vertex_paint_object and ts.vertex_paint) or - (context.weight_paint_object and ts.weight_paint) or - (context.image_paint_object and ts.image_paint)) + toolsettings = context.tool_settings + return ((context.sculpt_object and toolsettings.sculpt) or + (context.vertex_paint_object and toolsettings.vertex_paint) or + (context.weight_paint_object and toolsettings.weight_paint) or + (context.image_paint_object and toolsettings.image_paint)) def draw(self, context): layout = self.layout @@ -1102,8 +1104,8 @@ class VIEW3D_PT_tools_vertexpaint(PaintPanel, Panel): def draw(self, context): layout = self.layout - tool_settings = context.tool_settings - vpaint = tool_settings.vertex_paint + toolsettings = context.tool_settings + vpaint = toolsettings.vertex_paint col = layout.column() #col.prop(vpaint, "mode", text="") @@ -1141,8 +1143,9 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel, Panel): ob = context.active_object mesh = ob.data - ipaint = context.tool_settings.image_paint - settings = context.tool_settings.image_paint + toolsettings = context.tool_settings + ipaint = toolsettings.image_paint + settings = toolsettings.image_paint use_projection = ipaint.use_projection col = layout.column() @@ -1199,8 +1202,6 @@ class VIEW3D_PT_imagepaint_options(PaintPanel): def draw(self, context): layout = self.layout - tool_settings = context.tool_settings - col = layout.column() self.unified_paint_settings(col, context) |