]> git.mxchange.org Git - flightgear.git/blobdiff - utils/Modeller/uv_pack.py
- GPL license block
[flightgear.git] / utils / Modeller / uv_pack.py
index 64508b49ed95d1d36b4fa554b45fe9980663cbbe..245a429c8e6778f620e44509309b329b455a9854 100644 (file)
@@ -33,6 +33,26 @@ Usage:
 (7) export UV layout to SVG (UVs->Scripts->Save UV Face Layout)
 """
 
+
+#--------------------------------------------------------------------------------
+# Copyright (C) 2008  Melchior FRANZ  < mfranz # aon : at >
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+#--------------------------------------------------------------------------------
+
+
 MARGIN = 10 # px
 GAP = 10    # px
 
@@ -107,12 +127,11 @@ def pack():
        xscale = (1.0 - 2.0 * margin[0]) / boxmax
        yscale = (1.0 - 2.0 * margin[1]) / boxmax
 
-       Blender.Window.DrawProgressBar(0.2, "Erasing texture")
        image.reload()
        #drawrect(0, 0, 1, 1) # erase texture
 
        for i, box in enumerate(boxes):
-               Blender.Window.DrawProgressBar(i * 0.8 / len(boxes), "Drawing")
+               Blender.Window.DrawProgressBar(float(i) * len(boxes), "Drawing")
                xmin = ymin = BIG
                xmax = ymax = -BIG
                for f in box[6].faces: