Storing User Data in Maya Node

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  05 May 2013
Storing User Data in Maya Node

A typical query, But would be great to get the safest solution. Need to store string data as attributes, so can be retrieved back after reopening the file. Two options struck,
1] Using Unknown nodes
2] Using Empty Group nodes.
The problem being, while doing File Optimize, user might delete Unknown nodes and Empty transform nodes. Any other way to store data. Need a very "light weight" node.

Thanks for reading. Waiting for your tips.
 
  05 May 2013
try fileInfo
 
  05 May 2013
Take a look at my Red9 StudioPack, specifically the MetaData handler, does just this, manages any form of complex data onto either basic network nodes or directly on any node. Also manages JSON serialization so you can push any python type directly to it, including dics etc. The limit for string serialization to string attr in Maya is 37k, I've stored everything from full poses to attrMaps directly onto nodes internally.

Mark
__________________
Founder & CEO : Red9Consultancy
Red9 StudioPack : Red9 StudioPack GitHub
Author: Autodesk Masterclass 2011 - 'Live Animation Binding'
 
  05 May 2013
Thanks for the help guys. Sorry for late reply.
Robert, Regarding fileInfo
1] Can I store really large amount of data crossing 35k
2] Worry that you cant edit, its only remove and add, will that make it more heavy

For Mark-J,
I get using JSON its easy to serialize any value in string. My biggest issue is to chose the right node for storing values, which wont be easy for the user to fiddle with and doesnt get deleted while using file optimize or delete unused nodes.
Thanks both
 
  05 May 2013
Thanks for the help guys. Sorry for late reply.
Robert, Regarding fileInfo
0] My list is a nested list to 2 levels, i tried cPickle and json, but they give error on retrieving values back.
1] Can I store really large amount of data crossing 35k
2] Worry that you cant edit, its only remove and add, will that make it more heavy

For Mark-J,
I get using JSON its easy to serialize any value in string. My biggest issue is to chose the right node for storing values, which wont be easy for the user to fiddle with and doesnt get deleted while using file optimize or delete unused nodes.
Thanks both
 
  05 May 2013
In terms of nodes I always use network nodes in the Red9 MetaData, although that's not a limitation, the MetaData core doesn't care about node types, you can use the same api on any standard node and you get all the same attr handlers.

The reason I picked the network node rather doing my own nodetype is as you've already pointed out, I didn't want to have to build in requirements or end up with people having unknown nodes in their scenes if they weren't running Red9. As for serializing data for the scene, I do this on the time node in Maya for the 'sceneReview', it's a managed node, there is only ever 1 of them in the scene so you don't have to worry about merging in nodes when you import scenes etc.

I am however going to start to look into the new MetaData stuff in Maya2013, see if that may be a better solutions for scene based data.

Mark
__________________
Founder & CEO : Red9Consultancy
Red9 StudioPack : Red9 StudioPack GitHub
Author: Autodesk Masterclass 2011 - 'Live Animation Binding'
 
  05 May 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 11:48 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.