Export selected mesh in viewport to a file
Written by Park Yun Gyu
OutFile = createFile "C:\\ExportMesh.txt"
for t=1 to selection.count do
(
MyMesh = selection[t]
format "MeshName:%\n" MyMesh.name to: OutFile
format "TM:%\n" MyMesh.transform to: OutFile
SelMesh = snapshotAsMesh selection[t]
format "NumVert:%\n" SelMesh.numVerts to: OutFile
format "NumFace:%\n" SelMesh.numFaces to: OutFile
format "Verts\n" to: OutFile
for i=1 to SelMesh.numVerts do
(
vert = getVert SelMesh i
format "i:% % \n" i vert to: OutFile
)
format "Faces\n" to: OutFile
for i=1 to SelMesh.numFaces do
(
face = getFace SelMesh i
format "i:% % \n" i face to: OutFile
)
)
close OutFile
댓글 없음:
댓글 쓰기