Cleanup: pep8

This commit is contained in:
2019-05-22 00:27:01 +10:00
parent dfb2db10a0
commit 4ebb64697a
18 changed files with 164 additions and 76 deletions

View File

@@ -493,17 +493,41 @@ class IMAGE_MT_uvs_snap_pie(Menu):
layout.operator_context = 'EXEC_REGION_WIN'
pie.operator("uv.snap_selected", text="Selected to Pixels", icon='RESTRICT_SELECT_OFF').target = 'PIXELS'
pie.operator("uv.snap_cursor", text="Cursor to Pixels", icon='PIVOT_CURSOR').target = 'PIXELS'
pie.operator("uv.snap_cursor", text="Cursor to Selected", icon='PIVOT_CURSOR').target = 'SELECTED'
pie.operator("uv.snap_selected", text="Selected to Cursor", icon='RESTRICT_SELECT_OFF').target = 'CURSOR'
pie.operator("uv.snap_selected", text="Selected to Cursor (Offset)", icon='RESTRICT_SELECT_OFF').target = 'CURSOR_OFFSET'
pie.operator("uv.snap_selected", text="Selected to Adjacent Unselected", icon='RESTRICT_SELECT_OFF').target = 'ADJACENT_UNSELECTED'
pie.operator(
"uv.snap_selected",
text="Selected to Pixels",
icon='RESTRICT_SELECT_OFF',
).target = 'PIXELS'
pie.operator(
"uv.snap_cursor",
text="Cursor to Pixels",
icon='PIVOT_CURSOR',
).target = 'PIXELS'
pie.operator(
"uv.snap_cursor",
text="Cursor to Selected",
icon='PIVOT_CURSOR',
).target = 'SELECTED'
pie.operator(
"uv.snap_selected",
text="Selected to Cursor",
icon='RESTRICT_SELECT_OFF',
).target = 'CURSOR'
pie.operator(
"uv.snap_selected",
text="Selected to Cursor (Offset)",
icon='RESTRICT_SELECT_OFF',
).target = 'CURSOR_OFFSET'
pie.operator(
"uv.snap_selected",
text="Selected to Adjacent Unselected",
icon='RESTRICT_SELECT_OFF',
).target = 'ADJACENT_UNSELECTED'
class IMAGE_HT_tool_header(Header):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = "TOOL_HEADER"
bl_region_type = 'TOOL_HEADER'
def draw(self, context):
layout = self.layout
@@ -544,7 +568,12 @@ class IMAGE_HT_tool_header(Header):
if tool_mode == 'PAINT':
if (tool is not None) and tool.has_datablock:
layout.popover_group(space_type='IMAGE_EDITOR', region_type='UI', context=".paint_common_2d", category="")
layout.popover_group(
space_type='IMAGE_EDITOR',
region_type='UI',
context=".paint_common_2d",
category="",
)
elif tool_mode == 'UV':
if (tool is not None) and tool.has_datablock:
layout.popover_group(space_type='IMAGE_EDITOR', region_type='UI', context=".uv_sculpt", category="")
@@ -1450,7 +1479,6 @@ class IMAGE_PT_uv_sculpt_curve(Panel):
row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX'
class ImageScopesPanel:
@classmethod
def poll(cls, context):