Weight transfer question

20 views
Skip to first unread message

Kris Kelly

unread,
Aug 17, 2012, 7:14:38 AM8/17/12
to soft...@listproc.autodesk.com
Hi Guys,


Has anyone any experience in transfering the weight map properties of a deformer to a another object (null) using python??


I am exporting animation and mesh to a Our Engine on the iPad.


Created this so far,


root = Application.ActiveProject.ActiveScene.Root;

for deformer in Application.Selection:
nullName = deformer.Name
null = root.AddNull( nullName + "_bn" )
null.kinematics.AddConstraint( "pose", deformer, 0)



At the moment the character is enveloped to the Deformers and weights have been painted with great detail. When the script creates the nulls
based on the deformers to export to the engine with animation, I would also like to transfer the weight map to them automatically so I dont have to reskin.

Does anyone know how to do this or where I should start to look.... Python amature. :)

Any help is appreciated.

Thanks

Kris


Alok Gandhi

unread,
Aug 17, 2012, 8:02:45 AM8/17/12
to soft...@listproc.autodesk.com

Kris Kelly

unread,
Aug 17, 2012, 9:15:11 AM8/17/12
to soft...@listproc.autodesk.com
Thanks for this!   seems a like a perfect base.


Kris

Toonafish

unread,
Aug 17, 2012, 9:40:49 AM8/17/12
to soft...@listproc.autodesk.com
Couldn't you just give the Nulls identical names to the deformers, and then simply load a previously saved envelope ?

- Ronald

Kris Kelly

unread,
Aug 17, 2012, 10:05:08 AM8/17/12
to soft...@listproc.autodesk.com
Cheers Ronald.

I may be wrong......

but I think it would be better if the new nulls created became part of the character/scene rather than generated every time character export to engine.  



Kris

Alan Fregtman

unread,
Aug 17, 2012, 10:15:08 AM8/17/12
to soft...@listproc.autodesk.com
I have personally started following this policy of enveloping to nulls which I constrain to things because I've found if I change my mind about a setup I can always reparent some nulls and it's less work than removing deformers or transplanting weighting.

Alok Gandhi

unread,
Aug 17, 2012, 10:08:13 AM8/17/12
to soft...@listproc.autodesk.com
>"Couldn't you just give the Nulls identical names to the deformers, and then simply load a previously saved envelope ?"

That's exactly what the script is doing

Alok.

Alok Gandhi

unread,
Aug 17, 2012, 10:27:15 AM8/17/12
to soft...@listproc.autodesk.com
Yeah this should be a part of a standard rigging workflow. It has been long since I rigged, but when I was doing it I always kept nulls as deformers constrained to other parts of the rig. This way you always have a clean "layer" in your rig with just meshes and deformers. It then becomes very easy to plot all the deformer nulls and remove all constraints. The rig is then simply meshes with deformer having animation on them. It specially helps to export to other DCC apps without any pains.
Reply all
Reply to author
Forward
0 new messages