Reset Selected (Maya hotkey)
This script is intended to be used a Maya hotkey. It resets all selected objects to a neutral (local) transformation of 0,0,0,0,0,0,1,1,1.
To mimic the hotkey in Softimage, map this script to Ctrl-Shift-R. This is very useful for animation. It fully support undo and redo.
Create a Single Follicle (Maya)
This script adds a single follicle to a nurbs plane. Follicles are extremely useful for pinning items to geometry, or creating ribbons for cartoony rigs. For more examples of why to use follicles, check out my follicle blog post.
Most tutorials tell you to create a hair system and delete everything except the follicle. This is difficult to script and automate. The only way to access the hair command, at least by Maya 2012 was by using MEL. This script uses PyMEL which lets you easily access the follicle that you create as a casted PyNode.
There are 3 general ways to use this script:
Usage (Select a Nurbs surface and run):
1. On line 32, set U and V parameters. Default is 0.5 and 0.5.
2. Select a nurbs surface.
3. Run the script.
Usage (Define a Nurbs surface, for integrating in auto-riggers or other scripts):
1. On line 32 define a nurbs surface. eg. pm.PyNode(‘nurbsPlane1’)
2. On line 32, set U and V parameters. Default is 0.5 and 0.5.
3. Run the script.
If you want to create a ribbon with multiple follicles evenly spaced along the length, replace line 32 with something like this:
myObject = pm.selected() count = 8 for i in range(0,howMany): oFoll = create_follicle(myObject, i/(count-1.00), 0.5)
This script only supports working with nurbs surfaces rather than polygons because polygons require proper UVs for follicles to work predictably. I’ve included the line to use if you want to use polygons, but keep that in mind.
Get All Skin Influences (Maya)
This script takes a selection, finds all the joints that influence the skin and selects them.