diff options
Diffstat (limited to 'release/scripts/startup/bl_ui')
16 files changed, 67 insertions, 54 deletions
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' |