Home Youtube GitHub

Pre and Post scripts sharing


While mGear is an awesome tool, it does sometimes require customization when a deadline is approaching.

This thread is meant to serve as a collection for all pre and post scripts people might want to share to the community.


ngSkinTools Importer

I was missing a way of importing ngSkinTools exports with layers, so I made this post script:

Export your skinning with https://www.ngskintools.com/. Name a folder next to the current maya file {maya_filename}.skin and save the skinning in there with {mesh_name}.json.


Studio Library Importer

I was missing a way to import deformation animation when rebuilding.

Export your animation with https://www.studiolibrary.com/, name it the same as the maya file and save it next to the maya file you are working with. You can also just copy/rename the folder from an existing library.
Now just add the post script to the settings.

The script will search the directory of the currently opened maya file, find {maya_filename}.anim folder and apply the animation to rig.


Cool idea. I’ll try to find some of mine that are not too specific to our characters.

This one maybe should have been a bug report. When I move my character hundreds of units, the mouth curves slowly begin to collapse. I fix it like this:

# a hack or solution? Mouth wires don't follow rig 100% unless you crank up the dropoffDistance.
# So when the character moves large distances, the mouth slowly begins to collapse.
for each in pm.ls(type='wire'):


@Toke_Stuart_Jepsen and @chrislesage

Thanks guys! for sharing all this with the community :smiley:

This is super good idea!

EDIT: Just pinned it globally in the forum :slight_smile:



Eyes Rigger Importer


Name a folder next to the current maya file {maya_filename}.eyes and export your eye config there.


Delta Mush Importer

Export your delta mush weights with Deform > Export Weights as json. Name a folder next to the current maya file “delta_mush” and name the file {maya_filename}.{mesh_name}.json.


Does Deform -> Export Weights actually work for you? It has been completely unusable for me, spitting out useless data and/or importing mangled data.


Yeah, it works. I export json files and import by index. Any of the other import options like “nearest” doesn’t really work for me.

BTW I’m on Maya 2019, maybe that makes a difference.


Maybe a better idea than sharing the scripts here, would be to include them in the distribution so they can be git versioned?


@Toke_Stuart_Jepsen maybe a gist?


Sure, I’ll do that instead.

With gists or posting you might forget to update the online version, but with a git repository you can see there are changes to be staged/pushed.


Hey guys, can anyone here guide us how to use these pre and post scripts? Some of us here are not TDs and all the code just looks confusing. Some visual aid would be of great assistance. I must also confess that Github is also very confusing to me.


Hey @Ross_Daniel

Could you give us an example of which script you want to try?
There are some description of usage for some of the scripts, but don’t know where that documentation is failing you.


Can you just do a screen recording of you using anyone?