def dm2skin_getVertexLocationList(mesh, frame=0):
"""Gets a list of vertex locations on the given frame."""
numVerts = cmds.polyEvaluate(mesh, v=True)
resultList = []
cmds.currentTime(frame)
for v in range(0, numVerts):
pos = cmds.xform(mesh + '.vtx[' + str(v) + ']', q=True, ws=True, t=True)
resultList.append(np.array([pos[0], pos[1], pos[2], 1.0]))
return resultList
评论列表
文章目录