I am working on a script to generate modular rig segments such as IK/FK chains and other such controls to drive a result skeleton. After creating a rig segment, the user can then take those controls and add space-switching parents to them to make that part of the rig constrained to whatever parents the user wants. The script also has a derigging feature to remove the rig from the result joints cleanly; it can easily be reapplied, but currently the user has to set up all of the space-switching parents every time.
I have an idea for the derigging function to note which space-switching parents the rig segment has (if any) and stores that information in the result joints, so that when the script reapplies the rig, it can automatically reapply the space-switching parents as well.
Right now, I'm considering storing this information in the result joint's Notes attribute, but I would like to make sure that this isn't a bad idea before going through with it. Could I use a joint's Notes attribute to store rigging information for a rigging script, or should I store it in a custom attribute, if at all?
Replies
Example:
Also, thank you for letting me know that dictionaries are a thing! I've never really used Python before switching to it from MEL, so I know very little about it outside of what I've needed for this script. Having actual key-value pairs will definitely simplify a few of my functions, which currently try to do the same thing with nested lists.
Having the data this way gives you a lot of flexibility later. For example, you can say what length the joint is, or what side it is.