Hi
Here is my problem:
CODE
string $selectedNode[] = ls -sl;
string $someArray[] = { "string1", "string2", "string3" };
addAttr -ln "attrIsAnArray" -dataType stringArray $selectedNode[0]; // till there, no problem
setAttr ($selectedNode[0]+".attrIsAnArray") -type stringArray size $someArray $someArray;
gives:
CODE
// Error: Error reading data element number 5: //
The problem is that I should have written
CODE
setAttr ($selectedNode[0]+".attrIsAnArray") -type stringArray size $someArray "string1" "string2" "string3";
But I won't know what will be in the array!
I tried: CODE
setAttr ($selectedNode[0]+".attrIsAnArray") -type stringArray size $someArray stringArrayToString($arrayOfAttributes," ");
but doesn't work. (Obviously since it returns a single argument!)
What is the way to do it?
Thanks