Maxscript skin vertex weight bones

Maxscript skin vertex weight bones

参考链接:https://forums.cgsociety.org/t/maxscript-print-all-vertex-weights/1593264/5

(
      if iskindof (sk = modpanel.getcurrentobject()) Skin do
      (
        local skinVerts = skinops.getnumbervertices sk
        local getVertsWC = skinops.getvertexweightcount
        local getVWeight = skinops.getvertexweight
        local getBoneID = skinops.getvertexweightboneid
        local getBoneName = skinops.getbonename
          for v=1 to skinVerts do
          (
              count = getVertsWC sk v 
              format "% => weights:%
" v count
              for k=1 to count do
              (
                  boneid = getBoneID sk v k
                  format "    weight:% name:% id:%
" (getVWeight sk v k) (getBoneName sk boneid 0) boneid 
              )
          )
      )
)

 

posted @ 2023-05-31 16:43  ibingshan  阅读(99)  评论(0编辑  收藏  举报