PDA

View Full Version : transfer vertex weights from bone to bone


Soulcialism
12-09-2008, 05:17 PM
hey all,
i'm new to maxscript (coming from maya), and i'm trying to write a script that will take the weight of a vertex, compare it against a list of bones, and if it matches, replace the influence from one bone with the same influence of another bone.

i'm looking at the skinOps methods and it seems like everything i need is in here, but i'm wondering if i'm over-analyzing things. how i'm approaching it is:

#() = bad bone list
#() = good bone list

get all vert indices
get all skin influence bones
for each vertex,
if any of the influencing bones match bad bone list, then replace bad bone with good bone

it seems like scanning the entire mesh and all of the bones influencing it would be expensive, and also i'm not entirely sure how to use ReplaceVertexWeights to preserve the weights i already have and do not want to change. i guess i'm just looking to find out if these methods are the right way to go about it or if there are other more useful methods that i should check out.

there is a mel script from mike comet called transferWeights that i basically am trying to emulate, if anyone is familiar with that. unfortunately, this script doesn't seem to have been written for max.

CGTalk Moderation
12-09-2008, 05:17 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.