Copy weights from one object to another...?


#1

Is there a script that will do this?

I want to select my skinned object. Then select an unskinned object (that is the same vertex order) and then press a button. And have the new object have a the unskinned object get skinned with the same joints and influences and weights as the original object…

Anyone know of a script that does this?


#2

This assumes a lot, but should be a start for you:

[I]// select skinned mesh, then unskinned mesh, then run:

[B]string $sel[] = ls -sl;

$sourceSkin = findRelatedSkinCluster $sel[0];

$inf = skinCluster -q -inf $sourceSkin;

select -r $inf;

select -add $sel[1];

skinCluster;

$destSkin = findRelatedSkinCluster $sel[1];

copySkinWeights -noMirror -surfaceAssociation closestPoint -influenceAssociation closestJoint -ss $sourceSkin -ds $destSkin;[/B][/I]


#3

Why don’t u use “SKIN-> EDIT SMOOTHSKIN -> COPY SKIN WEIGHTS” ?

Works fine in most cases.


#4

I guess because the other mesh has no skin yet. For the influence Association I would suggest using “name”, that prevents problems when multiple influences are on the same spot in space.


#5

If the other Mesh has no skinning yet, just do a default skinning before und copy the weights afterwards.

Another Option is Maya’s “Substitute Geometry” Feature. Works fine as well.

A third Option is “Export Deformer Weights” from the Bonus Tools Menu, if installed

Greetz :slight_smile:


#6

What is the point of pointing the many ways to skin a mesh if the OP asked for a script/one-button-solution and got it?


#7

Just sharing Information that could be used inside a script, sorry! :eek:


#8

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.