Maxscript skin vertex weight bones

发布时间 2023-05-31 16:46:11作者: ibingshan

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 
              )
          )
      )
)