Ratmaster3d
05-02-2008, 02:57 PM
This fucntion allways returns an error to me no matter what I do.
I am writing a script for loding and here in a little snippit of it.
any help would be greatly appreciated
i even tried running this little line of code seperately on different computers and different bones and verts manually typing in the bone and the vert.:
skinops.getvertexweight $.modifiers 121 15
the syntax is:
skinops.getvertexweight <skin> <vertid> <boneid>
every time I use this expression i get this error:
Runtime error: Exceeded the vertex weight list countSkin:Skin
I previosly stored an array of vert ids in selected_verts[]
oldBoneWeight = 0.0
parentWeight = 0.0
for y = 1 to selected_verts.count do
(
skinOps.SelectVertices myskin selected_verts[y]
oldBoneWeight = skinOps.GetVertexWeight myskin selected_verts[y] oldbone -- get old bones weight
parentWeight = skinOps.GetVertexWeight myskin selected_verts[(y] parentbone -- get parent weight
skinOps.SetVertexWeights myskin selected_verts[(y+1)] oldbone 0 -- set the old bone to 0 weighting
skinOps.SetVertexWeights myskin selected_verts[(y+1)] parentbone ( parentWeight + oldBoneWeight ) -- set the parent bones wiethgin to the sum of old bone and parent bone
)
I am writing a script for loding and here in a little snippit of it.
any help would be greatly appreciated
i even tried running this little line of code seperately on different computers and different bones and verts manually typing in the bone and the vert.:
skinops.getvertexweight $.modifiers 121 15
the syntax is:
skinops.getvertexweight <skin> <vertid> <boneid>
every time I use this expression i get this error:
Runtime error: Exceeded the vertex weight list countSkin:Skin
I previosly stored an array of vert ids in selected_verts[]
oldBoneWeight = 0.0
parentWeight = 0.0
for y = 1 to selected_verts.count do
(
skinOps.SelectVertices myskin selected_verts[y]
oldBoneWeight = skinOps.GetVertexWeight myskin selected_verts[y] oldbone -- get old bones weight
parentWeight = skinOps.GetVertexWeight myskin selected_verts[(y] parentbone -- get parent weight
skinOps.SetVertexWeights myskin selected_verts[(y+1)] oldbone 0 -- set the old bone to 0 weighting
skinOps.SetVertexWeights myskin selected_verts[(y+1)] parentbone ( parentWeight + oldBoneWeight ) -- set the parent bones wiethgin to the sum of old bone and parent bone
)
