self.lines=[Line(e) for e in self.edges.itervalues() if not e.faces]
- smooth_limit=math.cos(m.degr*math.pi/180)
+ if m.mode&Blender.Mesh.Modes.AUTOSMOOTH:
+ smooth_limit=math.cos(m.degr*math.pi/180)
+ else:
+ smooth_limit=-1
for e in self.edges.itervalues():
e.v1=self.verts[e.v1.index]
e.v2=self.verts[e.v2.index]
if obj.getType()!="Mesh":
raise Exception, "Can only export Mesh data"
- mesh=Mesh(obj.getData(mesh=True))
+ mesh=Blender.Mesh.New("export_tmp")
+ mesh.getFromObject(obj)
+ mesh=Mesh(mesh)
if self.debug:
ntris=sum([len(f.verts)-2 for f in mesh.faces])