diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-08-09 23:59:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-08-09 23:59:01 +0400 |
commit | 0207d9ce275c7206fcf3abf9ba056ca18e0f3a87 (patch) | |
tree | cd1f9ef63a575a0fc13591565aae975ad267d5a3 /release/scripts | |
parent | 22694c993a7e32767db4719e9fa37e93445b66a8 (diff) |
style change, harmless changes while looking into bug [#28196]
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_operators/uvcalc_lightmap.py | 64 |
1 files changed, 50 insertions, 14 deletions
diff --git a/release/scripts/startup/bl_operators/uvcalc_lightmap.py b/release/scripts/startup/bl_operators/uvcalc_lightmap.py index 2f1acf0a5dc..d2371b0316a 100644 --- a/release/scripts/startup/bl_operators/uvcalc_lightmap.py +++ b/release/scripts/startup/bl_operators/uvcalc_lightmap.py @@ -23,7 +23,15 @@ import mathutils class prettyface(object): - __slots__ = "uv", "width", "height", "children", "xoff", "yoff", "has_parent", "rot" + __slots__ = ("uv", + "width", + "height", + "children", + "xoff", + "yoff", + "has_parent", + "rot", + ) def __init__(self, data): self.has_parent = False @@ -263,10 +271,9 @@ def lightmap_uvpack(meshes, del trylens def trilensdiff(t1, t2): - return\ - abs(t1[1][t1[2][0]] - t2[1][t2[2][0]]) + \ - abs(t1[1][t1[2][1]] - t2[1][t2[2][1]]) + \ - abs(t1[1][t1[2][2]] - t2[1][t2[2][2]]) + return (abs(t1[1][t1[2][0]] - t2[1][t2[2][0]]) + + abs(t1[1][t1[2][1]] - t2[1][t2[2][1]]) + + abs(t1[1][t1[2][2]] - t2[1][t2[2][2]])) while tri_lengths: tri1 = tri_lengths.pop() @@ -543,22 +550,51 @@ class LightMapPack(bpy.types.Operator): bl_options = {'REGISTER', 'UNDO'} PREF_CONTEXT = bpy.props.EnumProperty( + name="Selection", + description="", items=(("SEL_FACES", "Selected Faces", "Space all UVs evently"), ("ALL_FACES", "All Faces", "Average space UVs edge length of each loop"), ("ALL_OBJECTS", "Selected Mesh Object", "Average space UVs edge length of each loop") ), - name="Selection", - description="") + ) # Image & UVs... - PREF_PACK_IN_ONE = BoolProperty(name="Share Tex Space", default=True, description="Objects Share texture space, map all objects into 1 uvmap") - PREF_NEW_UVLAYER = BoolProperty(name="New UV Layer", default=False, description="Create a new UV layer for every mesh packed") - PREF_APPLY_IMAGE = BoolProperty(name="New Image", default=False, description="Assign new images for every mesh (only one if shared tex space enabled)") - PREF_IMG_PX_SIZE = IntProperty(name="Image Size", min=64, max=5000, default=512, description="Width and Height for the new image") - + PREF_PACK_IN_ONE = BoolProperty( + name="Share Tex Space", + description=("Objects Share texture space, map all objects " + "into 1 uvmap"), + default=True, + ) + PREF_NEW_UVLAYER = BoolProperty( + name="New UV Layer", + description="Create a new UV layer for every mesh packed", + default=False, + ) + PREF_APPLY_IMAGE = BoolProperty( + name="New Image", + description=("Assign new images for every mesh (only one if " + "shared tex space enabled)"), + default=False, + ) + PREF_IMG_PX_SIZE = IntProperty( + name="Image Size", + description="Width and Height for the new image", + min=64, max=5000, + default=512, + ) # UV Packing... - PREF_BOX_DIV = IntProperty(name="Pack Quality", min=1, max=48, default=12, description="Pre Packing before the complex boxpack") - PREF_MARGIN_DIV = FloatProperty(name="Margin", min=0.001, max=1.0, default=0.1, description="Size of the margin as a division of the UV") + PREF_BOX_DIV = IntProperty( + name="Pack Quality", + description="Pre Packing before the complex boxpack", + min=1, max=48, + default=12, + ) + PREF_MARGIN_DIV = FloatProperty( + name="Margin", + description="Size of the margin as a division of the UV", + min=0.001, max=1.0, + default=0.1, + ) def execute(self, context): kwargs = self.as_keywords() |