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