diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-20 05:01:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-20 05:11:04 +0300 |
commit | e71d489254c9d9639902e3ae8d2393a902eb11c8 (patch) | |
tree | 38f62429ed1331123658fdcf1e0fdfc64f1aec5f /release/scripts/startup/bl_ui | |
parent | 592165665543607bf43fdb13c4d2d7e51b37e8c6 (diff) |
Cleanup: style
Diffstat (limited to 'release/scripts/startup/bl_ui')
14 files changed, 37 insertions, 24 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_gpencil.py b/release/scripts/startup/bl_ui/properties_data_gpencil.py index 56612c3aa1b..f1205b05f3d 100644 --- a/release/scripts/startup/bl_ui/properties_data_gpencil.py +++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py @@ -143,7 +143,7 @@ class DATA_PT_gpencil_datapanel(Panel): srow = col.row(align=True) srow.prop(gpl, "opacity", text="Opacity", slider=True) srow.prop(gpl, "clamp_layer", text="", - icon='MOD_MASK' if gpl.clamp_layer else 'LAYER_ACTIVE') + icon='MOD_MASK' if gpl.clamp_layer else 'LAYER_ACTIVE') col = row.column() diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 7641851b183..3d4f3037a84 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -615,7 +615,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): layout.separator() col = layout.column() - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) col.label(text="Textures:") @@ -635,7 +634,6 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col.prop(md, "offset_u") col.prop(md, "offset_v") - def MULTIRES(self, layout, ob, md): layout.row().prop(md, "subdivision_type", expand=True) diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index 9ba2c0645d1..11aeb741352 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -983,8 +983,8 @@ class GPENCIL_UL_layer(UIList): row = layout.row(align=True) row.prop(gpl, "clamp_layer", text="", - icon='MOD_MASK' if gpl.clamp_layer else 'LAYER_ACTIVE', - emboss=False) + icon='MOD_MASK' if gpl.clamp_layer else 'LAYER_ACTIVE', + emboss=False) row.prop(gpl, "lock", text="", emboss=False) row.prop(gpl, "hide", text="", emboss=False) diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 76eee827553..72f48457faa 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -311,6 +311,7 @@ def brush_mask_texture_settings(layout, brush): col.prop(mask_tex_slot, "offset") col.prop(mask_tex_slot, "scale") + classes = ( VIEW3D_MT_tools_projectpaint_clone, ) diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 9f24945573b..a45c2bc0d27 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -148,6 +148,7 @@ class RENDER_PT_eevee_ambient_occlusion(RenderButtonsPanel, Panel): col.prop(props, "use_gtao_bent_normals") col.prop(props, "use_gtao_bounce") + class RENDER_PT_eevee_motion_blur(RenderButtonsPanel, Panel): bl_label = "Motion Blur" bl_options = {'DEFAULT_CLOSED'} @@ -505,7 +506,6 @@ class RENDER_PT_eevee_film(RenderButtonsPanel, Panel): col.prop(rd, "alpha_mode", text="Alpha") - class RENDER_PT_eevee_hair(RenderButtonsPanel, Panel): bl_label = "Hair" bl_options = {'DEFAULT_CLOSED'} diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index 47c5de861ca..f0f8cf1028d 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -423,6 +423,7 @@ class DOPESHEET_MT_marker(Menu): ####################################### # Keyframe Editing + class DOPESHEET_MT_channel(Menu): bl_label = "Channel" diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 6b407daaccb..73afb62567c 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -145,7 +145,6 @@ class NODE_HT_header(Header): layout.template_ID(snode, "node_tree", new="node.new_node_tree") - layout.prop(snode, "pin", text="") layout.separator_spacer() @@ -576,9 +575,11 @@ class EEVEE_NODE_PT_material_settings(Panel): @classmethod def poll(cls, context): snode = context.space_data - return (context.engine in cls.COMPAT_ENGINES) and \ - snode.tree_type == 'ShaderNodeTree' and snode.id and \ - snode.id.bl_rna.identifier == 'Material' + return ( + (context.engine in cls.COMPAT_ENGINES) and + (snode.tree_type == 'ShaderNodeTree' and snode.id) and + (snode.id.bl_rna.identifier == 'Material') + ) def draw(self, context): material = context.space_data.id @@ -595,8 +596,10 @@ class NODE_PT_material_viewport(Panel): @classmethod def poll(cls, context): snode = context.space_data - return snode.tree_type == 'ShaderNodeTree' and snode.id and \ - snode.id.bl_rna.identifier == 'Material' + return ( + (snode.tree_type == 'ShaderNodeTree' and snode.id) and + (snode.id.bl_rna.identifier == "Material") + ) def draw(self, context): material = context.space_data.id diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index a018a64e91c..b6c42d9208d 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -99,7 +99,7 @@ class SEQUENCER_HT_header(Header): if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}: layout.separator() - layout.operator("sequencer.refresh_all", icon="FILE_REFRESH", text="") + layout.operator("sequencer.refresh_all", icon='FILE_REFRESH', text="") if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}: layout.prop(st, "display_mode", text="", icon_only=True) @@ -408,7 +408,7 @@ class SEQUENCER_MT_add_effect(Menu): col.operator("sequencer.effect_strip_add", text="Alpha Over").type = 'ALPHA_OVER' col.operator("sequencer.effect_strip_add", text="Alpha Under").type = 'ALPHA_UNDER' col.operator("sequencer.effect_strip_add", text="Color Mix").type = 'COLORMIX' - col.enabled = sel_sequences(context) >=2 + col.enabled = sel_sequences(context) >= 2 layout.separator() diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py index d8a8c2a268e..9d13bd93c86 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py @@ -631,6 +631,7 @@ def _activate_by_item(context, space_type, item, index): handle = WindowManager.draw_cursor_add(handle_fn, (context, item, tool), space_type) handle_map[space_type] = handle + _activate_by_item._cursor_draw_handle = {} diff --git a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py index 24af3ce1318..a4ca27e8f48 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_toolbar.py @@ -32,6 +32,7 @@ from .space_toolsystem_common import ( ToolDef, ) + def generate_from_enum_ex( context, *, icon_prefix, @@ -873,6 +874,7 @@ class _defs_vertex_paint: attr="vertex_tool", ) + class _defs_texture_paint: @staticmethod @@ -1108,6 +1110,7 @@ class _defs_gpencil_paint: keymap=(), ) + class _defs_gpencil_edit: @ToolDef.from_fn def bend(): diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index 7b666d86dc1..67530ba71ee 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -540,7 +540,7 @@ class TOPBAR_PT_gpencil_layers(Panel): srow = col.row(align=True) srow.prop(gpl, "opacity", text="Opacity", slider=True) srow.prop(gpl, "clamp_layer", text="", - icon='MOD_MASK' if gpl.clamp_layer else 'LAYER_ACTIVE') + icon='MOD_MASK' if gpl.clamp_layer else 'LAYER_ACTIVE') col = row.column() diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 88bfa8a2e24..541158796e5 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -1571,7 +1571,7 @@ class USERPREF_PT_studiolight_light_editor(Panel): row = layout.row() row.prop(system, "edit_studio_light", toggle=True) - row.operator("wm.studiolight_new", text="Save as Studio light", icon="FILE_TICK") + row.operator("wm.studiolight_new", text="Save as Studio light", icon='FILE_TICK') layout.separator() diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index d6f27a3e0bc..3507ddb6c1f 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -4417,7 +4417,7 @@ class VIEW3D_PT_shading_lighting(Panel): sub.scale_y = 0.6 # smaller studiolight preview sub.template_icon_view(shading, "studio_light", scale=3) else: - sub.prop(system, "edit_studio_light", text="Disable Studio Light Edit", icon="NONE", toggle=True) + sub.prop(system, "edit_studio_light", text="Disable Studio Light Edit", icon='NONE', toggle=True) col = split.column() col.operator("wm.studiolight_userpref_show", emboss=False, text="", icon='PREFERENCES') @@ -4426,7 +4426,7 @@ class VIEW3D_PT_shading_lighting(Panel): col = split.column() row = col.row() - row.prop(shading, "use_world_space_lighting", text="", icon="WORLD", toggle=True) + row.prop(shading, "use_world_space_lighting", text="", icon='WORLD', toggle=True) row = row.row() row.active = shading.use_world_space_lighting row.prop(shading, "studiolight_rotate_z", text="Rotation") @@ -5263,7 +5263,7 @@ class VIEW3D_PT_transform_orientations(Panel): if orientation: row = layout.row(align=False) - row.prop(orientation, "name", text="", icon="OBJECT_ORIGIN") + row.prop(orientation, "name", text="", icon='OBJECT_ORIGIN') row.operator("transform.delete_orientation", text="", icon='X', emboss=False) diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 24ce5c5788d..5d7d9f3a675 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -631,13 +631,12 @@ class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel): col = layout.column() - row = col.row(align=True) sub = row.row(align=True) sub.prop(brush, "cursor_overlay_alpha", text="Curve Alpha") sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA') - row.prop(brush,"use_cursor_overlay", text="", toggle=True, icon='HIDE_OFF' if brush.use_cursor_overlay else 'HIDE_ON') + row.prop(brush, "use_cursor_overlay", text="", toggle=True, icon='HIDE_OFF' if brush.use_cursor_overlay else 'HIDE_ON') col.active = brush.brush_capabilities.has_overlay @@ -925,6 +924,8 @@ class VIEW3D_PT_sculpt_dyntopo_remesh(Panel, View3DPaintPanel): col.operator("sculpt.detail_flood_fill") # TODO, move to space_view3d.py + + class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel): bl_context = ".sculpt_mode" # dot on purpose (access from topbar) bl_label = "Options" @@ -972,6 +973,7 @@ class VIEW3D_PT_sculpt_options_unified(Panel, View3DPaintPanel): self.unified_paint_settings(layout, context) + class VIEW3D_PT_sculpt_options_gravity(Panel, View3DPaintPanel): bl_context = ".sculpt_mode" # dot on purpose (access from topbar) bl_parent_id = "VIEW3D_PT_sculpt_options" @@ -1302,6 +1304,7 @@ class VIEW3D_PT_tools_projectpaint(View3DPaintPanel, Panel): col = flow.column() col.prop(ipaint, "use_backface_culling") + class VIEW3D_PT_tools_projectpaint_unified(Panel, View3DPaintPanel): bl_context = ".imagepaint" # dot on purpose (access from topbar) bl_parent_id = "VIEW3D_PT_tools_projectpaint" @@ -1314,6 +1317,7 @@ class VIEW3D_PT_tools_projectpaint_unified(Panel, View3DPaintPanel): self.unified_paint_settings(layout, context) + class VIEW3D_PT_tools_projectpaint_cavity(View3DPaintPanel, Panel): bl_context = ".imagepaint" # dot on purpose (access from topbar) bl_label = "Cavity Mask" @@ -1454,6 +1458,8 @@ class VIEW3D_PT_tools_normal(View3DPanel, Panel): # ********** grease pencil object tool panels **************** # Grease Pencil drawing brushes + + class VIEW3D_PT_tools_grease_pencil_brush(View3DPanel, Panel): bl_context = ".greasepencil_paint" bl_label = "Brush" @@ -1702,7 +1708,7 @@ class VIEW3D_PT_tools_grease_pencil_brushcurves(View3DPanel, Panel): class VIEW3D_PT_tools_grease_pencil_brushcurves_sensitivity(View3DPanel, Panel): bl_context = ".greasepencil_paint" bl_label = "Sensitivity" - bl_parent_id ="VIEW3D_PT_tools_grease_pencil_brushcurves" + bl_parent_id = "VIEW3D_PT_tools_grease_pencil_brushcurves" @staticmethod def draw(self, context): @@ -1718,7 +1724,7 @@ class VIEW3D_PT_tools_grease_pencil_brushcurves_sensitivity(View3DPanel, Panel): class VIEW3D_PT_tools_grease_pencil_brushcurves_strength(View3DPanel, Panel): bl_context = ".greasepencil_paint" bl_label = "Strength" - bl_parent_id ="VIEW3D_PT_tools_grease_pencil_brushcurves" + bl_parent_id = "VIEW3D_PT_tools_grease_pencil_brushcurves" @staticmethod def draw(self, context): @@ -1734,7 +1740,7 @@ class VIEW3D_PT_tools_grease_pencil_brushcurves_strength(View3DPanel, Panel): class VIEW3D_PT_tools_grease_pencil_brushcurves_jitter(View3DPanel, Panel): bl_context = ".greasepencil_paint" bl_label = "Jitter" - bl_parent_id ="VIEW3D_PT_tools_grease_pencil_brushcurves" + bl_parent_id = "VIEW3D_PT_tools_grease_pencil_brushcurves" @staticmethod def draw(self, context): |