[Closed] Approaches to storing character rig info in an object?
Heya Folks,
I’m doing a load of automated rigging bits at the moment and for the purpose of doing import / exports of animation I’d like to be able to store info about the character bones / joint number etc. Do people normally just stick these into custom attributes? Is there any way of doing a kind of scene database that can’t be deleted?
I know Paul Neale is doing something with node store for these ends but any thoughts are welcome.
Cheers,
John
I did a ‘interface’ for the appData function that will store anything and preserve the ‘type’ of the data stored. However I did it at work so I’ll need to ask them if I can release it publicly. I’ll post it if they give me the thumbs up.
This thread might help you out: http://www.cgtalk.com/showthread.php?t=246818&highlight=store
Also, if you’re already using custom attributes, the string and stringTab parameter types are a great place to store information. It’s basically the same as using appData since you have to convert you’re info to a string, but it’s more portable in that if you add your CA to an Attribute Holder modifier, you can instance that modifier on to any object and have the information move with the modifier. And any function or operation within the CA can easily access the information.
If you need to store nodes, the string method doesn’t really work because you need to save the name of the object, and then get it back using ‘getNodeByName. But the name could easily change. So I’ve been storing the node handles in an intTab parameter within a CA. Works pretty good. It’s not the best solution, since the handles can change if you merge the objects into another scene. But at least it lets you store any node in the scene. The problem with Paul’s node store approach, as well as the node and nodeTab parameters in CA’s is that you can’t store the node the CA is attached to, or any nodes directly linked to it because you’ll get a dependency error. I’d like to see this changed in a future Max version, but for now we’re stuck with it. You can always create a hidden dummy in the scene and store all the nodes there, but personally I don’t like having extra objects in the scene that could potentially get left behind in a merge or accidentally deleted.
One handy bit of info I recently learned about converting arrays with over 20 elements to a string is using the ‘with printAllElements on’ context so that your string won’t get truncated. It’s new in Max 7. Look up ‘printAllElements’ in the reference to see what I’m talking about.
Excellent – thanks for pointing me in the right direction folks. I’ll check those out now!