Skip to content

Commit

Permalink
Use brief r=x,y,z syntax for radial normal tags.
Browse files Browse the repository at this point in the history
Less likely to overrun blender's limit on name lengths.
  • Loading branch information
ccxvii committed Feb 1, 2013
1 parent 7ff04dc commit 27a0f26
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/iqe.py
Expand Up @@ -42,12 +42,12 @@ def save(self, file):
for i in xrange(len(self.positions)):
xyz = self.positions[i]
print >>file, "vp %.9g %.9g %.9g" % xyz
if len(self.normals):
xyz = self.normals[i]
print >>file, "vn %.9g %.9g %.9g" % xyz
if len(self.texcoords):
xy = self.texcoords[i]
print >>file, "vt %.9g %.9g" % xy
if len(self.normals):
xyz = self.normals[i]
print >>file, "vn %.9g %.9g %.9g" % xyz
if len(self.colors):
xyzw = self.colors[i]
print >>file, "vc %.9g %.9g %.9g %.9g" % xyzw
Expand Down Expand Up @@ -301,9 +301,9 @@ def calc_radial_model(model):
centers = []
print >>sys.stderr, "radial mats", mesh.material
for tag in mesh.material:
if tag == "radial=center": centers.append(calc_mesh_center(mesh))
elif tag == "radial=base": centers.append(calc_mesh_base(mesh))
elif tag.startswith("radial="): centers.append(tuple([float(x) for x in tag[7:].split(",")]))
if tag == "r=center": centers.append(calc_mesh_center(mesh))
elif tag == "r=base": centers.append(calc_mesh_base(mesh))
elif tag.startswith("r="): centers.append(tuple([float(x) for x in tag[2:].split(",")]))
if len(centers) > 0:
calc_radial_mesh(mesh, centers)

Expand Down

0 comments on commit 27a0f26

Please sign in to comment.