def polyface(self, en, bm):
"""
pf: polyface
bm: Blender bmesh data to which the POLYFACE should be added to.
<-? bm.from_mesh(object.data) ?->
"""
for v in en.vertices:
bm.verts.new(v.location)
bm.verts.ensure_lookup_table()
for subface in en:
idx = subface.indices()
points = []
for p in idx:
if p not in points:
points.append(p)
if len(points) in (3, 4):
bm.faces.new([bm.verts[i] for i in points])
评论列表
文章目录