yeah... lame. But, if you want to iterate through an "array" of strings stored in a node, and dont want to delimit, rebuild the string and tokenize into a new array (which isn't terribly ineffecient, but sort of silly of maya), a guy from pixar on the dev list gives this very nice solution:
To: maya-dev@highend3d.com
Subject: Re: Help! getAttr BROKEN on -type stringArray?!
Reply-to: maya-dev@highend3d.com
I'm pretty sure that array attributes such as these can only be read via
API - it says on the getAttr help page:
"Currently, only numeric attributes, string attributes, matrix attributes,
and numeric compound attributes",
you could try instead:
createNode unknown -n "stringListStoreNode";
addAttr -ln arrayOfStrings -dt stringArray;
setAttr stringListStoreNode.arrayOfStrings -type stringArray 7 "one" "two"
"three" "four" "five" "six" "seven";
addAttr -dt "string" -ln "stringList" -sn "sLst" -m "stringListStoreNode";
setAttr -type "string" ("stringListStoreNode.sLst[0]") ("one");
setAttr -type "string" ("stringListStoreNode.sLst[1]") ("two");
setAttr -type "string" ("stringListStoreNode.sLst[2]") ("three");
then you can just access these as you would do point attributes e.g.
getAttr ("stringListStoreNode.sLst[1]")
// Result: two