Cleanup: trailing space, remove tabs, pep8
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
from bpy.types import Menu
|
||||
from bpy.app.translations import contexts as i18n_contexts
|
||||
|
||||
|
||||
|
||||
class MASK_MT_add(Menu):
|
||||
bl_idname = "MASK_MT_add"
|
||||
|
||||
@@ -670,9 +670,9 @@ class AddPresetGpencilMaterial(AddPresetBase, Operator):
|
||||
"gpcolor.stroke_image",
|
||||
"gpcolor.pixel_size",
|
||||
"gpcolor.use_stroke_pattern",
|
||||
"gpcolor.use_stroke_texture_mix",
|
||||
"gpcolor.mix_stroke_factor",
|
||||
"gpcolor.alignment_mode",
|
||||
"gpcolor.use_stroke_texture_mix",
|
||||
"gpcolor.mix_stroke_factor",
|
||||
"gpcolor.alignment_mode",
|
||||
"gpcolor.fill_style",
|
||||
"gpcolor.fill_color",
|
||||
"gpcolor.fill_image",
|
||||
|
||||
@@ -55,10 +55,10 @@ def pointInTri2D(v, v1, v2, v3):
|
||||
x= key[i]
|
||||
y= key[i+1]
|
||||
|
||||
if xmax<x: xmax= x
|
||||
if ymax<y: ymax= y
|
||||
if xmin>x: xmin= x
|
||||
if ymin>y: ymin= y
|
||||
if xmax<x: xmax= x
|
||||
if ymax<y: ymax= y
|
||||
if xmin>x: xmin= x
|
||||
if ymin>y: ymin= y
|
||||
|
||||
x= v.x
|
||||
y= v.y
|
||||
@@ -169,7 +169,7 @@ def island2Edge(island):
|
||||
|
||||
# Its okay to leave the length in there.
|
||||
# for e in length_sorted_edges:
|
||||
# e.pop(2)
|
||||
# e.pop(2)
|
||||
|
||||
# return edges and unique points
|
||||
return length_sorted_edges, [v.to_3d() for v in unique_points.values()]
|
||||
@@ -410,7 +410,7 @@ def mergeUvIslands(islandList):
|
||||
elif Intersect == 0: # No intersection?? Place it.
|
||||
# Progress
|
||||
removedCount += 1
|
||||
# XXX Window.DrawProgressBar(0.0, 'Merged: %i islands, Ctrl to finish early.' % removedCount)
|
||||
# XXX Window.DrawProgressBar(0.0, 'Merged: %i islands, Ctrl to finish early.' % removedCount)
|
||||
|
||||
# Move faces into new island and offset
|
||||
targetIsland[0].extend(sourceIsland[0])
|
||||
@@ -485,7 +485,7 @@ def getUvIslands(faceGroups, me):
|
||||
|
||||
islandList = []
|
||||
|
||||
# XXX Window.DrawProgressBar(0.0, 'Splitting %d projection groups into UV islands:' % len(faceGroups))
|
||||
# XXX Window.DrawProgressBar(0.0, 'Splitting %d projection groups into UV islands:' % len(faceGroups))
|
||||
# print '\tSplitting %d projection groups into UV islands:' % len(faceGroups),
|
||||
# Find grouped faces
|
||||
|
||||
@@ -552,7 +552,7 @@ def getUvIslands(faceGroups, me):
|
||||
break
|
||||
# if not ok will stop looping
|
||||
|
||||
# XXX Window.DrawProgressBar(0.1, 'Optimizing Rotation for %i UV Islands' % len(islandList))
|
||||
# XXX Window.DrawProgressBar(0.1, 'Optimizing Rotation for %i UV Islands' % len(islandList))
|
||||
|
||||
for island in islandList:
|
||||
optiRotateUvIsland(island)
|
||||
@@ -562,7 +562,7 @@ def getUvIslands(faceGroups, me):
|
||||
|
||||
def packIslands(islandList):
|
||||
if USER_FILL_HOLES:
|
||||
# XXX Window.DrawProgressBar(0.1, 'Merging Islands (Ctrl: skip merge)...')
|
||||
# XXX Window.DrawProgressBar(0.1, 'Merging Islands (Ctrl: skip merge)...')
|
||||
mergeUvIslands(islandList) # Modify in place
|
||||
|
||||
# Now we have UV islands, we need to pack them.
|
||||
@@ -611,18 +611,18 @@ def packIslands(islandList):
|
||||
# with the islands.
|
||||
|
||||
# print '\tPacking UV Islands...'
|
||||
# XXX Window.DrawProgressBar(0.7, "Packing %i UV Islands..." % len(packBoxes) )
|
||||
# XXX Window.DrawProgressBar(0.7, "Packing %i UV Islands..." % len(packBoxes) )
|
||||
|
||||
# time1 = time.time()
|
||||
packWidth, packHeight = geometry.box_pack_2d(packBoxes)
|
||||
|
||||
# print 'Box Packing Time:', time.time() - time1
|
||||
|
||||
# if len(pa ckedLs) != len(islandList):
|
||||
# if len(packedLs) != len(islandList):
|
||||
# raise ValueError("Packed boxes differs from original length")
|
||||
|
||||
# print '\tWriting Packed Data to faces'
|
||||
# XXX Window.DrawProgressBar(0.8, "Writing Packed Data to faces")
|
||||
# XXX Window.DrawProgressBar(0.8, "Writing Packed Data to faces")
|
||||
|
||||
# Sort by ID, so there in sync again
|
||||
islandIdx = len(islandList)
|
||||
|
||||
@@ -127,7 +127,7 @@ class DATA_PT_gpencil_layers(DataButtonsPanel, Panel):
|
||||
|
||||
row = layout.row()
|
||||
layer_rows = 7
|
||||
|
||||
|
||||
col = row.column()
|
||||
col.template_list("GPENCIL_UL_layer", "", gpd, "layers", gpd.layers, "active_index",
|
||||
rows=layer_rows, sort_reverse=True, sort_lock=True)
|
||||
@@ -152,13 +152,13 @@ class DATA_PT_gpencil_layers(DataButtonsPanel, Panel):
|
||||
sub = col.column(align=True)
|
||||
sub.operator("gpencil.layer_isolate", icon='LOCKED', text="").affect_visibility = False
|
||||
sub.operator("gpencil.layer_isolate", icon='RESTRICT_VIEW_ON', text="").affect_visibility = True
|
||||
|
||||
|
||||
# Layer main properties
|
||||
row = layout.row()
|
||||
row = layout.row()
|
||||
col = layout.column(align=True)
|
||||
|
||||
if gpl:
|
||||
|
||||
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = True
|
||||
|
||||
@@ -459,6 +459,7 @@ class DATA_PT_vertex_colors(MeshButtonsPanel, Panel):
|
||||
col.operator("mesh.vertex_color_add", icon='ADD', text="")
|
||||
col.operator("mesh.vertex_color_remove", icon='REMOVE', text="")
|
||||
|
||||
|
||||
class DATA_PT_remesh(MeshButtonsPanel, Panel):
|
||||
bl_label = "Remesh"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@@ -1783,7 +1783,7 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
|
||||
|
||||
col.label(text="Material:")
|
||||
row = col.row(align=True)
|
||||
|
||||
|
||||
row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE')
|
||||
row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT')
|
||||
row = layout.row(align=True)
|
||||
|
||||
@@ -604,10 +604,10 @@ class GPENCIL_MT_move_to_layer(Menu):
|
||||
while(i >= 0):
|
||||
gpl = gpd.layers[i]
|
||||
if gpl.info == gpl_active.info:
|
||||
icon='GREASEPENCIL'
|
||||
icon = 'GREASEPENCIL'
|
||||
else:
|
||||
icon = 'NONE'
|
||||
layout.operator("gpencil.move_to_layer", text=gpl.info, icon=icon).layer=i
|
||||
layout.operator("gpencil.move_to_layer", text=gpl.info, icon=icon).layer = i
|
||||
i -= 1
|
||||
|
||||
layout.separator()
|
||||
@@ -640,7 +640,7 @@ class GPENCIL_MT_cleanup(Menu):
|
||||
|
||||
if ob.mode != 'PAINT_GPENCIL':
|
||||
layout.operator("gpencil.stroke_merge_by_distance", text="Merge by Distance")
|
||||
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.operator("gpencil.frame_clean_fill", text="Boundary Strokes").mode = 'ACTIVE'
|
||||
|
||||
@@ -48,6 +48,7 @@ class GPENCIL_MT_color_context_menu(Menu):
|
||||
|
||||
layout.operator("object.material_slot_remove_unused")
|
||||
|
||||
|
||||
class GPENCIL_UL_matslots(UIList):
|
||||
def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname, _index):
|
||||
slot = item
|
||||
@@ -164,6 +165,7 @@ class MATERIAL_PT_gpencil_strokecolor(GPMaterialButtonsPanel, Panel):
|
||||
if gpcolor.mode == 'LINE' and gpcolor.stroke_style != 'TEXTURE':
|
||||
col.prop(gpcolor, "use_overlap_strokes")
|
||||
|
||||
|
||||
class MATERIAL_PT_gpencil_fillcolor(GPMaterialButtonsPanel, Panel):
|
||||
bl_label = "Fill"
|
||||
bl_parent_id = 'MATERIAL_PT_gpencil_surface'
|
||||
@@ -274,7 +276,8 @@ class MATERIAL_PT_gpencil_material_presets(PresetPanel, Panel):
|
||||
preset_add_operator = "scene.gpencil_material_preset_add"
|
||||
|
||||
|
||||
classes = (GPENCIL_UL_matslots,
|
||||
classes = (
|
||||
GPENCIL_UL_matslots,
|
||||
GPENCIL_MT_color_context_menu,
|
||||
MATERIAL_PT_gpencil_slots,
|
||||
MATERIAL_PT_gpencil_preview,
|
||||
@@ -283,7 +286,8 @@ classes = (GPENCIL_UL_matslots,
|
||||
MATERIAL_PT_gpencil_strokecolor,
|
||||
MATERIAL_PT_gpencil_fillcolor,
|
||||
MATERIAL_PT_gpencil_options,
|
||||
MATERIAL_PT_gpencil_custom_props,)
|
||||
MATERIAL_PT_gpencil_custom_props,
|
||||
)
|
||||
|
||||
if __name__ == "__main__": # only for live edit.
|
||||
from bpy.utils import register_class
|
||||
|
||||
@@ -1257,14 +1257,14 @@ class CLIP_MT_view(Menu):
|
||||
layout.operator("clip.view_all", text="View Fit").fit_view = True
|
||||
|
||||
layout.separator()
|
||||
|
||||
|
||||
layout.operator("clip.view_zoom_in")
|
||||
layout.operator("clip.view_zoom_out")
|
||||
|
||||
layout.separator()
|
||||
|
||||
|
||||
layout.prop(sc, "show_metadata")
|
||||
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.menu("CLIP_MT_view_zoom")
|
||||
|
||||
@@ -125,6 +125,7 @@ class CONSOLE_MT_console(Menu):
|
||||
|
||||
layout.operator("console.autocomplete", text="Autocomplete")
|
||||
|
||||
|
||||
class CONSOLE_MT_context_menu(Menu):
|
||||
bl_label = "Console Context Menu"
|
||||
|
||||
|
||||
@@ -450,7 +450,7 @@ class FILEBROWSER_MT_select(Menu):
|
||||
layout.separator()
|
||||
|
||||
layout.operator("file.select_box")
|
||||
|
||||
|
||||
|
||||
class FILEBROWSER_MT_context_menu(Menu):
|
||||
bl_label = "Files Context Menu"
|
||||
|
||||
@@ -113,6 +113,7 @@ class INFO_MT_context_menu(Menu):
|
||||
layout.operator("info.report_copy", text="Copy")
|
||||
layout.operator("info.report_delete", text="Delete")
|
||||
|
||||
|
||||
classes = (
|
||||
INFO_HT_header,
|
||||
INFO_MT_editor_menus,
|
||||
|
||||
@@ -998,10 +998,11 @@ class _defs_sculpt:
|
||||
label="Mesh Filter",
|
||||
icon="ops.sculpt.mesh_filter",
|
||||
widget=None,
|
||||
keymap= (),
|
||||
keymap=(),
|
||||
draw_settings=draw_settings,
|
||||
)
|
||||
|
||||
|
||||
class _defs_vertex_paint:
|
||||
|
||||
@staticmethod
|
||||
|
||||
@@ -605,7 +605,7 @@ class VIEW3D_HT_header(Header):
|
||||
row.prop(tool_settings, "gpencil_selectmode_edit", text="", expand=True)
|
||||
|
||||
# Select mode for Sculpt
|
||||
if gpd.is_stroke_sculpt_mode :
|
||||
if gpd.is_stroke_sculpt_mode:
|
||||
row = layout.row(align=True)
|
||||
row.prop(tool_settings, "use_gpencil_select_mask_point", text="")
|
||||
row.prop(tool_settings, "use_gpencil_select_mask_stroke", text="")
|
||||
@@ -2654,7 +2654,6 @@ class VIEW3D_MT_make_links(Menu):
|
||||
layout.operator("object.join_uvs") # stupid place to add this!
|
||||
|
||||
|
||||
|
||||
class VIEW3D_MT_brush_paint_modes(Menu):
|
||||
bl_label = "Enabled Modes"
|
||||
|
||||
@@ -2849,27 +2848,27 @@ class VIEW3D_MT_sculpt(Menu):
|
||||
|
||||
props = layout.operator("sculpt.mask_filter", text='Smooth Mask')
|
||||
props.filter_type = 'SMOOTH'
|
||||
props.auto_iteration_count = True;
|
||||
props.auto_iteration_count = True
|
||||
|
||||
props = layout.operator("sculpt.mask_filter", text='Sharpen Mask')
|
||||
props.filter_type = 'SHARPEN'
|
||||
props.auto_iteration_count = True;
|
||||
props.auto_iteration_count = True
|
||||
|
||||
props = layout.operator("sculpt.mask_filter", text='Grow Mask')
|
||||
props.filter_type = 'GROW'
|
||||
props.auto_iteration_count = True;
|
||||
props.auto_iteration_count = True
|
||||
|
||||
props = layout.operator("sculpt.mask_filter", text='Shrink Mask')
|
||||
props.filter_type = 'SHRINK'
|
||||
props.auto_iteration_count = True;
|
||||
props.auto_iteration_count = True
|
||||
|
||||
props = layout.operator("sculpt.mask_filter", text='Increase Contrast')
|
||||
props.filter_type = 'CONTRAST_INCREASE'
|
||||
props.auto_iteration_count = False;
|
||||
props.auto_iteration_count = False
|
||||
|
||||
props = layout.operator("sculpt.mask_filter", text='Decrease Contrast')
|
||||
props.filter_type = 'CONTRAST_DECREASE'
|
||||
props.auto_iteration_count = False;
|
||||
props.auto_iteration_count = False
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -4813,6 +4812,7 @@ class VIEW3D_MT_proportional_editing_falloff_pie(Menu):
|
||||
|
||||
pie.prop(tool_settings, "proportional_edit_falloff", expand=True)
|
||||
|
||||
|
||||
class VIEW3D_MT_sculpt_mask_edit_pie(Menu):
|
||||
bl_label = "Mask Edit"
|
||||
|
||||
@@ -4826,22 +4826,22 @@ class VIEW3D_MT_sculpt_mask_edit_pie(Menu):
|
||||
op.mode = 'VALUE'
|
||||
op = pie.operator("sculpt.mask_filter", text='Smooth Mask')
|
||||
op.filter_type = 'SMOOTH'
|
||||
op.auto_iteration_count = True;
|
||||
op.auto_iteration_count = True
|
||||
op = pie.operator("sculpt.mask_filter", text='Sharpen Mask')
|
||||
op.filter_type = 'SHARPEN'
|
||||
op.auto_iteration_count = True;
|
||||
op.auto_iteration_count = True
|
||||
op = pie.operator("sculpt.mask_filter", text='Grow Mask')
|
||||
op.filter_type = 'GROW'
|
||||
op.auto_iteration_count = True;
|
||||
op.auto_iteration_count = True
|
||||
op = pie.operator("sculpt.mask_filter", text='Shrink Mask')
|
||||
op.filter_type = 'SHRINK'
|
||||
op.auto_iteration_count = True;
|
||||
op.auto_iteration_count = True
|
||||
op = pie.operator("sculpt.mask_filter", text='Increase Contrast')
|
||||
op.filter_type = 'CONTRAST_INCREASE'
|
||||
op.auto_iteration_count = False;
|
||||
op.auto_iteration_count = False
|
||||
op = pie.operator("sculpt.mask_filter", text='Decrease Contrast')
|
||||
op.filter_type = 'CONTRAST_DECREASE'
|
||||
op.auto_iteration_count = False;
|
||||
op.auto_iteration_count = False
|
||||
|
||||
|
||||
# ********** Panel **********
|
||||
|
||||
@@ -1158,6 +1158,7 @@ class VIEW3D_PT_sculpt_dyntopo_remesh(Panel, View3DPaintPanel):
|
||||
col = flow.column()
|
||||
col.operator("sculpt.detail_flood_fill")
|
||||
|
||||
|
||||
class VIEW3D_PT_sculpt_voxel_remesh(Panel, View3DPaintPanel):
|
||||
bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
|
||||
bl_label = "Remesh"
|
||||
@@ -1191,6 +1192,7 @@ class VIEW3D_PT_sculpt_voxel_remesh(Panel, View3DPaintPanel):
|
||||
|
||||
# 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"
|
||||
|
||||
Reference in New Issue
Block a user