1
0
Fork 0

final cosmetics (because I had posted the web-cvs link to the blender list/forum :-)

This commit is contained in:
mfranz 2008-03-10 16:31:02 +00:00
parent 182c1cdae8
commit 205da67313
2 changed files with 6 additions and 6 deletions

View file

@ -71,7 +71,7 @@ class UVFaceGroups:
found = [] found = []
for face in faces.itervalues(): for face in faces.itervalues():
for c in face.uv: for c in face.uv:
if (tuple(c)) in uvcoords: if tuple(c) in uvcoords:
for c in face.uv: for c in face.uv:
uvcoords[tuple(c)] = True uvcoords[tuple(c)] = True
found.append(face) found.append(face)
@ -83,9 +83,9 @@ class UVFaceGroups:
del faces[face.index] del faces[face.index]
def hashcolor(name): def stringcolor(string):
random.seed(hash(name)) random.seed(hash(string))
c = [random.randint(220, 255), random.randint(120, 220), random.randint(120, 220)] c = [random.randint(220, 255), random.randint(120, 240), random.randint(120, 240)]
random.shuffle(c) random.shuffle(c)
return "#%02x%02x%02x" % tuple(c) return "#%02x%02x%02x" % tuple(c)
@ -117,7 +117,7 @@ def write_svg(path):
for meshname, v in objects.iteritems(): for meshname, v in objects.iteritems():
objname, mesh = v objname, mesh = v
color = FILL_COLOR or hashcolor(meshname) color = FILL_COLOR or stringcolor(meshname)
svg.write('\t<g style="fill:%s; stroke:black stroke-width:1px" inkscape:label="%s" ' \ svg.write('\t<g style="fill:%s; stroke:black stroke-width:1px" inkscape:label="%s" ' \
'id="%s">\n' % (color, objname, objname)) 'id="%s">\n' % (color, objname, objname))

View file

@ -153,7 +153,7 @@ def parse_transform(s):
elif cmd == "matrix": elif cmd == "matrix":
if num == 6: if num == 6:
matrix.multiply(Matrix(arg[0], arg[1], arg[2], arg[3], arg[4], arg[5])) matrix.multiply(Matrix(*arg))
continue continue
else: else: