From 97d62f018397d279f6f1654c76d1e6b414c9d343 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 15 Jan 2013 23:15:32 +0000 Subject: style cleanup --- release/scripts/startup/bl_operators/node.py | 4 ++- release/scripts/startup/bl_operators/object.py | 26 +++++++++--------- release/scripts/startup/bl_operators/presets.py | 10 +++---- .../startup/bl_operators/uvcalc_follow_active.py | 15 +++++------ .../startup/bl_operators/uvcalc_lightmap.py | 16 +++++------ release/scripts/startup/bl_operators/wm.py | 2 +- release/scripts/startup/bl_ui/__init__.py | 1 + .../scripts/startup/bl_ui/properties_data_mesh.py | 1 - .../startup/bl_ui/properties_data_modifier.py | 17 ++++++------ release/scripts/startup/bl_ui/properties_game.py | 5 ++-- .../startup/bl_ui/properties_mask_common.py | 6 +++-- .../startup/bl_ui/properties_object_constraint.py | 1 - .../startup/bl_ui/properties_physics_common.py | 2 +- .../bl_ui/properties_physics_dynamicpaint.py | 2 +- .../startup/bl_ui/properties_physics_smoke.py | 24 ++++++++++------- release/scripts/startup/bl_ui/properties_render.py | 3 ++- release/scripts/startup/bl_ui/space_clip.py | 18 ++++++++----- release/scripts/startup/bl_ui/space_dopesheet.py | 4 +-- release/scripts/startup/bl_ui/space_info.py | 2 +- release/scripts/startup/bl_ui/space_text.py | 2 +- release/scripts/startup/bl_ui/space_userpref.py | 31 +++++++++++----------- release/scripts/startup/bl_ui/space_view3d.py | 2 +- 22 files changed, 104 insertions(+), 90 deletions(-) (limited to 'release/scripts/startup') diff --git a/release/scripts/startup/bl_operators/node.py b/release/scripts/startup/bl_operators/node.py index 39e00f94953..bc0224db765 100644 --- a/release/scripts/startup/bl_operators/node.py +++ b/release/scripts/startup/bl_operators/node.py @@ -22,6 +22,7 @@ import bpy from bpy.types import Operator from bpy.props import BoolProperty, EnumProperty, StringProperty + # Base class for node 'Add' operators class NodeAddOperator(): @staticmethod @@ -78,8 +79,9 @@ class NODE_OT_add_node(NodeAddOperator, Operator): use_transform = BoolProperty( name="Use Transform", description="Start transform operator after inserting the node", - default = False, + default=False, ) + def execute(self, context): node = self.create_node(context, self.type) diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py index d6a0e30b110..567ea830409 100644 --- a/release/scripts/startup/bl_operators/object.py +++ b/release/scripts/startup/bl_operators/object.py @@ -111,10 +111,10 @@ class SelectCamera(Operator): bl_options = {'REGISTER', 'UNDO'} extend = BoolProperty( - name="Extend", - description="Extend the selection", - default=False - ) + name="Extend", + description="Extend the selection", + default=False + ) def execute(self, context): scene = context.scene @@ -305,7 +305,7 @@ class ShapeTransfer(Operator): ('RELATIVE_EDGE', "Relative Edge", "Calculate relative position (using edges)", - ), + ), ), name="Transformation Mode", description="Relative shape positions to the new shape method", @@ -682,7 +682,7 @@ class TransformsToDeltasAnim(Operator): "scale" : "delta_scale" } DELTA_PATHS = STANDARD_TO_DELTA_PATHS.values() - + # try to apply on each selected object success = False for obj in context.selected_editable_objects: @@ -692,7 +692,7 @@ class TransformsToDeltasAnim(Operator): "No animation data to convert on object: %r" % obj.name) continue - + # first pass over F-Curves: ensure that we don't have conflicting # transforms already (e.g. if this was applied already) [#29110] existingFCurves = {} @@ -708,7 +708,7 @@ class TransformsToDeltasAnim(Operator): else: # non-transform - ignore continue - + # a delta path like this for the same index shouldn't # exist already, otherwise we've got a conflict if dpath in existingFCurves: @@ -716,8 +716,9 @@ class TransformsToDeltasAnim(Operator): if fcu.array_index in existingFCurves[dpath]: # conflict self.report({'ERROR'}, - "Object '%r' already has '%r' F-Curve(s). Remove these before trying again" % - (obj.name, dpath)) + "Object '%r' already has '%r' F-Curve(s). " + "Remove these before trying again" % + (obj.name, dpath)) return {'CANCELLED'} else: # no conflict here @@ -725,8 +726,7 @@ class TransformsToDeltasAnim(Operator): else: # no conflict yet existingFCurves[dpath] = [fcu.array_index] - - + # if F-Curve uses standard transform path # just append "delta_" to this path for fcu in adt.action.fcurves: @@ -766,7 +766,7 @@ class DupliOffsetFromCursor(Operator): @classmethod def poll(cls, context): - return context.active_object is not None + return (context.active_object is not None) def execute(self, context): scene = context.scene diff --git a/release/scripts/startup/bl_operators/presets.py b/release/scripts/startup/bl_operators/presets.py index ae4079e35aa..dac7adecaff 100644 --- a/release/scripts/startup/bl_operators/presets.py +++ b/release/scripts/startup/bl_operators/presets.py @@ -320,13 +320,13 @@ class AddPresetFluid(AddPresetBase, Operator): preset_menu = "FLUID_MT_presets" preset_defines = [ - "fluid = bpy.context.fluid" - ] + "fluid = bpy.context.fluid" + ] preset_values = [ - "fluid.settings.viscosity_base", - "fluid.settings.viscosity_exponent", - ] + "fluid.settings.viscosity_base", + "fluid.settings.viscosity_exponent", + ] preset_subdir = "fluid" diff --git a/release/scripts/startup/bl_operators/uvcalc_follow_active.py b/release/scripts/startup/bl_operators/uvcalc_follow_active.py index 7b6013f3044..ee3ae2878dc 100644 --- a/release/scripts/startup/bl_operators/uvcalc_follow_active.py +++ b/release/scripts/startup/bl_operators/uvcalc_follow_active.py @@ -26,18 +26,18 @@ from bpy.types import Operator def extend(obj, operator, EXTEND_MODE): - + import bmesh me = obj.data # script will fail without UVs if not me.uv_textures: me.uv_textures.new() - + bm = bmesh.from_edit_mesh(me) - + f_act = bm.faces.active uv_act = bm.loops.layers.uv.active - + if f_act is None: operator.report({'ERROR'}, "No active face") return @@ -57,7 +57,7 @@ def extend(obj, operator, EXTEND_MODE): f.tag = False # tag the active face True since we begin there f_act.tag = True - + def walk_face(f): # all faces in this list must be tagged f.tag = True @@ -102,7 +102,6 @@ def extend(obj, operator, EXTEND_MODE): else: break - def extrapolate_uv(fac, l_a_outer, l_a_inner, l_b_outer, l_b_inner): @@ -112,7 +111,7 @@ def extend(obj, operator, EXTEND_MODE): def apply_uv(f_prev, l_prev, f_next): l_a = [None, None, None, None] l_b = [None, None, None, None] - + l_a[0] = l_prev l_a[1] = l_a[0].link_loop_next l_a[2] = l_a[1].link_loop_next @@ -133,7 +132,7 @@ def extend(obj, operator, EXTEND_MODE): # +-----------+ # copy from this face to the one above. - # get the other loops + # get the other loops l_next = l_prev.link_loop_radial_next if l_next.vert != l_prev.vert: l_b[1] = l_next diff --git a/release/scripts/startup/bl_operators/uvcalc_lightmap.py b/release/scripts/startup/bl_operators/uvcalc_lightmap.py index 198b3660ff8..6cb9e7276fd 100644 --- a/release/scripts/startup/bl_operators/uvcalc_lightmap.py +++ b/release/scripts/startup/bl_operators/uvcalc_lightmap.py @@ -189,14 +189,14 @@ class prettyface(object): def lightmap_uvpack(meshes, - PREF_SEL_ONLY=True, - PREF_NEW_UVLAYER=False, - PREF_PACK_IN_ONE=False, - PREF_APPLY_IMAGE=False, - PREF_IMG_PX_SIZE=512, - PREF_BOX_DIV=8, - PREF_MARGIN_DIV=512 - ): + PREF_SEL_ONLY=True, + PREF_NEW_UVLAYER=False, + PREF_PACK_IN_ONE=False, + PREF_APPLY_IMAGE=False, + PREF_IMG_PX_SIZE=512, + PREF_BOX_DIV=8, + PREF_MARGIN_DIV=512 + ): """ BOX_DIV if the maximum division of the UV map that a box may be consolidated into. diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index b33a10b671e..6c418902433 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1584,7 +1584,7 @@ class WM_OT_addon_enable(Operator): "version %d.%d.%d and might not " "function (correctly), " "though it is enabled") % - info_ver) + info_ver) return {'FINISHED'} else: return {'CANCELLED'} diff --git a/release/scripts/startup/bl_ui/__init__.py b/release/scripts/startup/bl_ui/__init__.py index aa1a8a9a25b..9ed12943bf8 100644 --- a/release/scripts/startup/bl_ui/__init__.py +++ b/release/scripts/startup/bl_ui/__init__.py @@ -133,6 +133,7 @@ def register(): def unregister(): bpy.utils.unregister_module(__name__) + # Define a default UIList, when a list does not need any custom drawing... class UI_UL_list(bpy.types.UIList): pass diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index f50fc55abac..dcef5aaa096 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -194,7 +194,6 @@ class DATA_PT_vertex_groups(MeshButtonsPanel, Panel): row = layout.row() row.template_list("MESH_UL_vgroups", "", ob, "vertex_groups", ob.vertex_groups, "active_index", rows=rows) - col = row.column(align=True) col.operator("object.vertex_group_add", icon='ZOOMIN', text="") col.operator("object.vertex_group_remove", icon='ZOOMOUT', text="").all = False diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index df29f18853b..31557d5fa2d 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -333,23 +333,23 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): def LAPLACIANSMOOTH(self, layout, ob, md): layout.prop(md, "iterations") - + split = layout.split(percentage=0.25) - + col = split.column() col.label(text="Axis:") col.prop(md, "use_x") col.prop(md, "use_y") col.prop(md, "use_z") - + col = split.column() col.label(text="Lambda:") col.prop(md, "lambda_factor", text="Factor") col.prop(md, "lambda_border", text="Border") - + col.separator() col.prop(md, "use_volume_preserve") - + layout.label(text="Vertex Group:") layout.prop_search(md, "vertex_group", ob, "vertex_groups", text="") @@ -558,7 +558,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col = split.column() - def PARTICLE_INSTANCE(self, layout, ob, md): layout.prop(md, "object") layout.prop(md, "particle_system_index", text="Particle System") @@ -1045,12 +1044,12 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): def UV_WARP(self, layout, ob, md): split = layout.split() col = split.column() - col.prop(md, "center"); + col.prop(md, "center") col = split.column() col.label(text="UV Axis:") - col.prop(md, "axis_u", text=""); - col.prop(md, "axis_v", text=""); + col.prop(md, "axis_u", text="") + col.prop(md, "axis_v", text="") split = layout.split() col = split.column() diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py index 58b6aa6916c..a896855b217 100644 --- a/release/scripts/startup/bl_ui/properties_game.py +++ b/release/scripts/startup/bl_ui/properties_game.py @@ -199,6 +199,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel): col = split.column() col.prop(game, "collision_mask") + class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, Panel): bl_label = "Collision Bounds" COMPAT_ENGINES = {'BLENDER_GAME'} @@ -411,10 +412,10 @@ class RENDER_PT_game_system(RenderButtonsPanel, Panel): col = row.column() col.prop(gs, "use_display_lists") col.active = gs.raster_storage != 'VERTEX_BUFFER_OBJECT' - + row = layout.row() row.prop(gs, "raster_storage") - + row = layout.row() row.label("Exit Key") row.prop(gs, "exit_key", text="", event=True) diff --git a/release/scripts/startup/bl_ui/properties_mask_common.py b/release/scripts/startup/bl_ui/properties_mask_common.py index 9861db39f30..3bdb6f32076 100644 --- a/release/scripts/startup/bl_ui/properties_mask_common.py +++ b/release/scripts/startup/bl_ui/properties_mask_common.py @@ -26,7 +26,8 @@ from bpy.types import Menu, UIList class MASK_UL_layers(UIList): - def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): + def draw_item(self, context, layout, data, item, icon, + active_data, active_propname, index): # assert(isinstance(item, bpy.types.MaskLayer) mask = item if self.layout_type in {'DEFAULT', 'COMPACT'}: @@ -86,7 +87,8 @@ class MASK_PT_layers: rows = 5 if active_layer else 2 row = layout.row() - row.template_list("MASK_UL_layers", "", mask, "layers", mask, "active_layer_index", rows=rows) + row.template_list("MASK_UL_layers", "", mask, "layers", + mask, "active_layer_index", rows=rows) sub = row.column(align=True) diff --git a/release/scripts/startup/bl_ui/properties_object_constraint.py b/release/scripts/startup/bl_ui/properties_object_constraint.py index eb0929895f8..6478e49f464 100644 --- a/release/scripts/startup/bl_ui/properties_object_constraint.py +++ b/release/scripts/startup/bl_ui/properties_object_constraint.py @@ -172,7 +172,6 @@ class ConstraintButtonsPanel(): sub.active = con.use_rotation sub.prop(con, "orient_weight", text="Rotation", slider=True) - def IK_COPY_POSE(self, context, layout, con): self.target_template(layout, con) self.ik_template(layout, con) diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py index b70ff322765..db8dfd7a542 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -133,7 +133,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype): row.prop(cache, "frame_end") if cachetype not in {'SMOKE', 'CLOTH', 'DYNAMIC_PAINT'}: row.prop(cache, "frame_step") - + if cachetype != 'SMOKE': layout.label(text=cache.info) diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py index 9393852b8a5..efc675ffe83 100644 --- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py +++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py @@ -80,7 +80,7 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel): row = layout.row() row.template_list("PHYSICS_UL_dynapaint_surfaces", "", canvas, "canvas_surfaces", - canvas.canvas_surfaces, "active_index", rows=2) + canvas.canvas_surfaces, "active_index", rows=2) col = row.column(align=True) col.operator("dpaint.surface_slot_add", icon='ZOOMIN', text="") diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py index ce5053f0ecf..487f43aa973 100644 --- a/release/scripts/startup/bl_ui/properties_physics_smoke.py +++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py @@ -76,7 +76,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel): elif md.smoke_type == 'FLOW': flow = md.flow_settings - + layout.prop(flow, "smoke_flow_type", expand=False) if flow.smoke_flow_type != "OUTFLOW": @@ -118,7 +118,8 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel): col = split.column() col.prop(coll, "collision_type") - + + class PHYSICS_PT_smoke_flow_advanced(PhysicButtonsPanel, Panel): bl_label = "Smoke Flow Advanced" bl_options = {'DEFAULT_CLOSED'} @@ -132,7 +133,7 @@ class PHYSICS_PT_smoke_flow_advanced(PhysicButtonsPanel, Panel): layout = self.layout ob = context.object flow = context.smoke.flow_settings - + split = layout.split() col = split.column() @@ -147,11 +148,12 @@ class PHYSICS_PT_smoke_flow_advanced(PhysicButtonsPanel, Panel): if flow.texture_map_type == "AUTO": sub.prop(flow, "texture_size") sub.prop(flow, "texture_offset") - + col = split.column() col.label(text="Vertex Group:") col.prop_search(flow, "density_vertex_group", ob, "vertex_groups", text="") + class PHYSICS_PT_smoke_fire(PhysicButtonsPanel, Panel): bl_label = "Smoke Flames" bl_options = {'DEFAULT_CLOSED'} @@ -179,7 +181,8 @@ class PHYSICS_PT_smoke_fire(PhysicButtonsPanel, Panel): col.prop(domain, "flame_ignition") col.prop(domain, "flame_max_temp") col.prop(domain, "flame_smoke_color") - + + class PHYSICS_PT_smoke_adaptive_domain(PhysicButtonsPanel, Panel): bl_label = "Smoke Adaptive Domain" bl_options = {'DEFAULT_CLOSED'} @@ -199,10 +202,10 @@ class PHYSICS_PT_smoke_adaptive_domain(PhysicButtonsPanel, Panel): domain = context.smoke.domain_settings layout.active = domain.use_adaptive_domain - + split = layout.split() - split.enabled = not domain.point_cache.is_baked - + split.enabled = (not domain.point_cache.is_baked) + col = split.column(align=True) col.label(text="Resolution:") col.prop(domain, "additional_res") @@ -212,6 +215,7 @@ class PHYSICS_PT_smoke_adaptive_domain(PhysicButtonsPanel, Panel): col.label(text="Advanced:") col.prop(domain, "adapt_threshold") + class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel): bl_label = "Smoke High Resolution" bl_options = {'DEFAULT_CLOSED'} @@ -249,6 +253,7 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel): layout.prop(md, "show_high_resolution") + class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel): bl_label = "Smoke Groups" bl_options = {'DEFAULT_CLOSED'} @@ -262,7 +267,7 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel): def draw(self, context): layout = self.layout domain = context.smoke.domain_settings - + split = layout.split() col = split.column() @@ -276,6 +281,7 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel): col.label(text="Collision Group:") col.prop(domain, "collision_group", text="") + class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel): bl_label = "Smoke Cache" bl_options = {'DEFAULT_CLOSED'} diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 03b3d41b631..29e32401d2b 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -60,6 +60,7 @@ class RENDER_UL_renderlayers(UIList): # uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, itemptr, "use", 0, 0, 0, 0, 0, NULL); # } + class RenderButtonsPanel(): bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' @@ -356,7 +357,7 @@ class RENDER_PT_performance(RenderButtonsPanel, Panel): subsub = sub.column() subsub.enabled = rd.threads_mode == 'FIXED' subsub.prop(rd, "threads") - + sub = col.column(align=True) sub.label(text="Tile Size:") sub.prop(rd, "tile_x", text="X") diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 5fc57133767..db71bbe2390 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -23,14 +23,17 @@ from bpy.types import Panel, Header, Menu, UIList class CLIP_UL_tracking_objects(UIList): - def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): + def draw_item(self, context, layout, data, item, icon, + active_data, active_propname, index): # assert(isinstance(item, bpy.types.MovieTrackingObject) tobj = item if self.layout_type in {'DEFAULT', 'COMPACT'}: - layout.label(tobj.name, icon='CAMERA_DATA' if tobj.is_camera else 'OBJECT_DATA') + layout.label(tobj.name, icon='CAMERA_DATA' + if tobj.is_camera else 'OBJECT_DATA') elif self.layout_type in {'GRID'}: layout.alignment = 'CENTER' - layout.label("", icon='CAMERA_DATA' if tobj.is_camera else 'OBJECT_DATA') + layout.label("", icon='CAMERA_DATA' + if tobj.is_camera else 'OBJECT_DATA') class CLIP_HT_header(Header): @@ -333,7 +336,8 @@ class CLIP_PT_tools_solve(CLIP_PT_tracking_panel, Panel): col = layout.column(align=True) col.active = not settings.use_tripod_solver - col.prop(settings, "use_fallback_reconstruction", text="Allow Fallback") + col.prop(settings, "use_fallback_reconstruction", + text="Allow Fallback") sub = col.column() sub.active = settings.use_fallback_reconstruction sub.prop(settings, "reconstruction_success_threshold") @@ -482,7 +486,8 @@ class CLIP_PT_objects(CLIP_PT_clip_view_panel, Panel): tracking = sc.clip.tracking row = layout.row() - row.template_list("CLIP_UL_tracking_objects", "", tracking, "objects", tracking, "active_object_index", rows=3) + row.template_list("CLIP_UL_tracking_objects", "", tracking, "objects", + tracking, "active_object_index", rows=3) sub = row.column(align=True) @@ -738,7 +743,8 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel): layout.active = stab.use_2d_stabilization row = layout.row() - row.template_list("UI_UL_list", "", stab, "tracks", stab, "active_track_index", rows=3) + row.template_list("UI_UL_list", "", stab, "tracks", + stab, "active_track_index", rows=3) sub = row.column(align=True) diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index 5535070c1c4..094fa4a7c6d 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -275,8 +275,8 @@ class DOPESHEET_MT_key(Menu): layout.operator("action.keyframe_insert") layout.separator() - layout.operator("action.frame_jump") - + layout.operator("action.frame_jump") + layout.separator() layout.operator("action.duplicate_move") layout.operator("action.delete") diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py index 8df117e27a0..d85b59d18d5 100644 --- a/release/scripts/startup/bl_ui/space_info.py +++ b/release/scripts/startup/bl_ui/space_info.py @@ -112,7 +112,7 @@ class INFO_MT_file(Menu): layout.separator() - layout.operator_context = 'EXEC_AREA' if context.blend_data.is_saved else 'INVOKE_AREA' + layout.operator_context = 'EXEC_AREA' if context.blend_data.is_saved else 'INVOKE_AREA' layout.operator("wm.save_mainfile", text="Save", icon='FILE_TICK') layout.operator_context = 'INVOKE_AREA' diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py index 960a945f1c6..65ec945c7da 100644 --- a/release/scripts/startup/bl_ui/space_text.py +++ b/release/scripts/startup/bl_ui/space_text.py @@ -152,7 +152,7 @@ class TEXT_MT_view(Menu): layout = self.layout layout.operator("text.properties", icon='MENU_PANEL') - + layout.separator() layout.operator("text.move", diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index a9712b1557e..daf9190e766 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -24,25 +24,25 @@ import os def ui_style_items(col, context): """ UI Style settings """ - + split = col.split() - + col = split.column() col.label(text="Kerning Style:") col.row().prop(context, "font_kerning_style", expand=True) col.prop(context, "points") - + col = split.column() col.label(text="Shadow Offset:") col.prop(context, "shadow_offset_x", text="X") col.prop(context, "shadow_offset_y", text="Y") - + col = split.column() col.prop(context, "shadow") col.prop(context, "shadowalpha") col.prop(context, "shadowcolor") - + def ui_items_general(col, context): """ General UI Theme Settings (User Interface) """ @@ -200,7 +200,7 @@ class USERPREF_PT_interface(Panel): col.prop(view, "show_playback_fps", text="Playback FPS") col.prop(view, "use_global_scene") col.prop(view, "object_origin_size") - + col.separator() col.separator() col.separator() @@ -763,13 +763,13 @@ class USERPREF_PT_theme(Panel): colsub.row().prop(ui, "axis_x") colsub.row().prop(ui, "axis_y") colsub.row().prop(ui, "axis_z") - + subsplit = row.split(percentage=0.85) padding = subsplit.split(percentage=0.15) colsub = padding.column() colsub = padding.column() - + layout.separator() layout.separator() elif theme.theme_area == 'BONE_COLOR_SETS': @@ -797,16 +797,16 @@ class USERPREF_PT_theme(Panel): colsub.row().prop(ui, "show_colored_constraints") elif theme.theme_area == 'STYLE': col = split.column() - + style = context.user_preferences.ui_styles[0] - + ui = style.widget col.label(text="Widget:") ui_style_items(col, ui) - + col.separator() col.separator() - + ui = style.widget_label col.label(text="Widget Label:") ui_style_items(col, ui) @@ -1100,8 +1100,8 @@ class USERPREF_PT_addons(Panel): used_ext = {ext.module for ext in userpref.addons} userpref_addons_folder = os.path.join(userpref.filepaths.script_directory, "addons") - scripts_addons_folder = bpy.utils.user_resource('SCRIPTS', "addons") - + scripts_addons_folder = bpy.utils.user_resource('SCRIPTS', "addons") + # collect the categories that can be filtered on addons = [(mod, addon_utils.module_bl_info(mod)) for mod in addon_utils.modules(addon_utils.addons_fake_modules)] @@ -1152,7 +1152,7 @@ class USERPREF_PT_addons(Panel): (filter == "Enabled" and is_enabled) or (filter == "Disabled" and not is_enabled) or (filter == "User" and (mod.__file__.startswith((scripts_addons_folder, userpref_addons_folder)))) - ): + ): if search and search not in info["name"].lower(): if info["author"]: @@ -1244,7 +1244,6 @@ class USERPREF_PT_addons(Panel): box_prefs.label(text="Error (see console)", icon='ERROR') del addon_preferences_class.layout - # Append missing scripts # First collect scripts that are used but have no script file. module_names = {mod.__name__ for mod, info in addons} diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 52fdf9810eb..46c574d6138 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1537,7 +1537,7 @@ class VIEW3D_MT_pose_group(Menu): def draw(self, context): layout = self.layout - + pose = context.active_object.pose layout.operator_context = 'EXEC_AREA' -- cgit v1.2.3