Cleanup: trailing space, remove tabs, pep8

This commit is contained in:
2019-09-10 06:11:52 +10:00
parent 51334dd3a6
commit c8c3e7d284
29 changed files with 90 additions and 79 deletions

View File

@@ -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"

View File

@@ -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",

View File

@@ -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)