MathJax

레이블이 3ds Max인 게시물을 표시합니다. 모든 게시물 표시
레이블이 3ds Max인 게시물을 표시합니다. 모든 게시물 표시

2011년 9월 10일 토요일

Skin Inforamtion Export Script in 3ds Max

Export skin information of node which has skin modifier
Written by Park Yun Gyu

mynode = select $
myskin = mynode.modifiers[#Skin]

OutFile = createfile "c:\\ExportSkin.txt"

NumVert = skinOps.getNumberVertices myskin
for i=1 to NumVert do
(
NumWeight = skinOps.GetVertexWeightCount myskin i
format "i:% NumWeight:%\n" i NumWeight to: OutFile
for w=1 to NumWeight do
(
BoneID = skinOps.GetVertexWeightBoneID myskin i w
BoneName = skinOps.GetBoneName myskin BoneID 1
format "--BoneID:% BoneName:%\n" BoneID BoneName to: OutFile

)
)

close OutFile

2011년 8월 31일 수요일

Physique Inforamtion Export Script in 3ds Max

Export physique information in viewport to a file
Written by Park Yun Gyu
SelNode = selection[1]
SelMesh = snapshotAsMesh SelNode
CurPhysique = physiqueOps.getPhysiqueModifier SelNode
OutFile = createFile "c:\\Export_Physique.txt"
for i=1 to SelMesh.numVerts do
(
PyType = physiqueOps.getVertexType SelNode i
BoneCount = physiqueOps.getVertexBoneCount SelNode i
format "i:% Type:% BoneCnt:% \n" i PyType BoneCount to: OutFile
for BoneCnt=1 to BoneCount do
(
BoneNode = physiqueOps.getVertexBone SelNode i BoneCnt
Weight = physiqueOps.getVertexWeight SelNode i BoneCnt
format " NodeName:% Weight%\n" BoneNode.name Weight to: OutFile
)
)
close OutFile

2011년 8월 29일 월요일

Mesh Information Export Script in 3ds Max

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