Website powered by

Smart Null-Attribute Script

General / 30 January 2017

Here’s a quick script that I wrote during my last rigging project. For every object in the selection, it gets the keyable attributes and their defaults and sets those attributes to their defaults.

It works on default and user-defined attributes. I have it mapped to a hotkey (ctrl+0) and it really speeds things up!

 

 import maya.cmds as cmds   # bm_nullAttr # sets channel box values to default for every object in selection. Works on default and custom attributes.  # get the selection def nullAttr():     sel = cmds.ls(sl=1)     for obj in sel:         # list the keyable attributes on that object         keyable = cmds.listAttr(obj, k=1)         for attr in keyable:             # find each attribute's default value and set it             default = cmds.attributeQuery(attr, node=obj, listDefault=1)             cmds.setAttr(obj + "." + attr, default[0])   

Solomon Rig 2.0

General / 30 January 2017

After some feedback, I chose to re-work most of the Solomon rig. I had to fix some flipping problems in the wrists and forearms that was being caused by poor rotation orders, so that meant that I had to completely re-skin the body. Unfortunately, mirroring skin weights doesn’t work very well on this model so I basically had to do the whole thing manually -_-

I also re-did the whole face. This time, I edited the model and made the face a separate mesh from the body so that the blendshapes wouldn’t take up so much memory. I chose almost a completely blendshape-based approach, which gave nice shapes but not as much flexibility as the wire deformer approach on the previous version. There are always trade-offs.

For my next rig, I want to try the Josh Sobel method of facial rigging that I learned from his vimeo tutorial series. It involves “World” and “Local” rigs that are skinned mostly with joints. It’s fast, flexible, and scalable, something that my blendshape-based approach can’t compete with.

Besides that, I also needed to fix some shearing problems with the teeth and gums. They were likely caused because I didn’t self-group the geometry before constraining it to the jaw controls.