Import Skin Weight maps without DialogBox

90 views
Skip to first unread message

Mahmoodreza Aarabi

unread,
Sep 11, 2016, 2:12:12 AM9/11/16
to Python Programming for Autodesk Maya
Hey masters

I want to import skin weight maps of an object with python code, but i think maya does not have equivalent of `Rigging > skin > Import Wights Maps...`, i found that just there is one MEL command that will open the related dialogbox, thi: `mel.eval("ImportSkinWeightMaps;")`.
but, because i want to do it automatically not with user interaction so i need a better command, pymel has it too, but just open dialogbox not anymore.

any advice?
thanks

Christopher Crouzet

unread,
Sep 11, 2016, 10:12:16 AM9/11/16
to python_in...@googlegroups.com
I wrote a really quick'n'dirty one to be used as part as of a rig builder, so maybe you can use it as a starting point. Here's the code: https://gist.github.com/christophercrouzet/2e74ca5b6f33500caf95b0c9244c27e6

I've just extracted it from a codebase and didn't really tested it after that, so maybe there's some glitches. Also it relies on a library (that'd need a revamping) named `banana.maya` but the functions being used could easily be extracted, I just didn't take the time to do so. Anyways, it should be enough as it is to give an idea of the basics.


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/52203884-72b2-40e2-baaf-7110c65d9382%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages