Go for it! A nice and easy first step is to clone a component and just edit it.
Copy a component that is close to what you want to do. Put it somewhere in a separate directory of your choosing.
Point that directory in your Maya.env
MGEAR_SHIFTER_COMPONENT_PATH = /your/path/to/customModules
In the guide.py of the new custom component, you need to change the TYPE and the NAME to be something unique. These lines are usually near the top, after the module imports.
For example the most simple module change I did was this: I cloned the control_01
component, and made my own called hook_01
. Then I edited the component to not make any control icons, and to name it _hook instead of _ctl. I use these as blank nodes that can still have space switches, but the animators don’t see them. They don’t get added to the control selection sets.
If your guide settings and number of guide objects match, then in Maya, you can just go into the attribute editor of a guide, and change the .comp_type
attribute. And the next time you open the guide settings it will load the settings for your custom module. (If your stuff doesn’t match, you’ll likely cause errors when you build.)
For example for me, I would change .comp_type from control_01
to hook_01
and the guide will automatically become a hook_01 component.
That way, you can change existing guides to another type of custom component without having to re-rig or place the guides over again.
Finally, then you just dig through __init__.py
and edit the things you want to change. I think you have to restart Maya when you make changes to component code though. Utilities
-> Reload
didn’t always seem to work for me. But I haven’t tested that since mGear 3.1.