View Full Version : Storing Array Data in scene

09 September 2010, 09:50 AM
Ok, so basically I'm trying to store a list of object names into a physical node in maya so that when the object is imported into different scenes you just need to select the overall node and then apply the scripts, and it will already know the geometry, nurbs and groups that it needs to apply the script too are.

I hope this makes sence, I basically just want to say something like:

setAttr ($tCNode + ".grpList") $tGrpList;

that will handle a list of data.

Kind Regards,


09 September 2010, 11:09 AM
Not sure of an efficient way to do this.
I suppose you could store a string in a text attribute type on a null, each item seperated with whitespace.
Then whenever you need the list, query the attribute and use tokenizeList or something.

09 September 2010, 01:13 PM
you can add a string array (multi) attribute to your node.

for example:
string $dataNode = "locator1";
addAttr -multi -ln "nodeName" -dt "string" $dataNode;
for ($n=0 ; $n<8 ; $n++)
setAttr ($dataNode+".nodeName["+$n+"]") -type "string" ("Entry number: "+$n);

CGTalk Moderation
09 September 2010, 01:13 PM
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.