Cleanup: pep8

This commit is contained in:
2019-10-12 10:22:09 +11:00
parent d105b620fa
commit bde328352b
9 changed files with 14 additions and 7 deletions

View File

@@ -565,7 +565,12 @@ def unwrap(operator, context, **kwargs):
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
# define list of meshes
meshes = list({me for obj in context.selected_objects if obj.type == 'MESH' for me in (obj.data,) if me.polygons and me.library is None})
meshes = list({
me for obj in context.selected_objects
if obj.type == 'MESH'
for me in (obj.data,)
if me.polygons and me.library is None
})
if not meshes:
operator.report({'ERROR'}, "No mesh object")

View File

@@ -1999,7 +1999,6 @@ class WM_OT_batch_rename(Operator):
descr,
)
return data
@staticmethod

View File

@@ -348,7 +348,6 @@ class DATA_PT_font(CurveButtonsPanelText, Panel):
row.label(text="Bold & Italic")
row.template_ID(text, "font_bold_italic", open="font.open", unlink="font.unlink")
if mode == 'EDIT_TEXT':
layout.separator()

View File

@@ -485,6 +485,7 @@ class DATA_PT_remesh(MeshButtonsPanel, Panel):
else:
col.operator("object.quadriflow_remesh", text="QuadriFlow Remesh")
class DATA_PT_customdata(MeshButtonsPanel, Panel):
bl_label = "Geometry Data"
bl_options = {'DEFAULT_CLOSED'}

View File

@@ -950,6 +950,7 @@ class GPENCIL_UL_layer(UIList):
icon_value=icon,
)
class GreasePencilSimplifyPanel:
def draw_header(self, context):
@@ -977,6 +978,7 @@ class GreasePencilSimplifyPanel:
sub.active = rd.simplify_gpencil_view_fill
sub.prop(rd, "simplify_gpencil_remove_lines", text="Lines")
classes = (
GPENCIL_MT_pie_tool_palette,
GPENCIL_MT_pie_settings_palette,

View File

@@ -419,7 +419,7 @@ def brush_basic_gpencil_paint_settings(layout, _context, brush, tool, *, compact
row = layout.row(align=True)
row.prop(gp_settings, "pen_strength", slider=True)
row.prop(gp_settings, "use_strength_pressure", text="", icon='STYLUS_PRESSURE')
if tool.idname in {"builtin.arc", "builtin.curve", "builtin.line", "builtin.box", "builtin.circle"}:
settings = _context.tool_settings.gpencil_sculpt
if is_toolbar:

View File

@@ -158,7 +158,8 @@ class FILEBROWSER_PT_filter(Panel):
def panel_poll_is_upper_region(region):
# The upper region is left-aligned, the lower is split into it then. Note that after "Flip Regions" it's right-aligned.
# The upper region is left-aligned, the lower is split into it then.
# Note that after "Flip Regions" it's right-aligned.
return region.alignment in {'LEFT', 'RIGHT'}

View File

@@ -1392,7 +1392,6 @@ class _defs_gpencil_paint:
keymap=(),
)
@ToolDef.from_fn
def eyedropper():
return dict(
@@ -1404,6 +1403,7 @@ class _defs_gpencil_paint:
keymap=(),
)
class _defs_gpencil_edit:
@ToolDef.from_fn
def bend():

View File

@@ -5058,7 +5058,7 @@ class VIEW3D_PT_collections(Panel):
subrow.active = collection.is_visible # Parent collection runtime visibility
subrow.prop(child, "hide_viewport", text="", emboss=False)
else:
subrow.active = collection.visible_get() # Parent collection runtime visibility
subrow.active = collection.visible_get() # Parent collection runtime visibility
icon = 'HIDE_OFF' if child.visible_get() else 'HIDE_ON'
props = subrow.operator("object.hide_collection", text="", icon=icon, emboss=False)
props.collection_index = index