Hi everyone,
I try to use setAttr to update a custom attribute I defined on a group node of type stringArray. Whatever kind of format I use it does not start working.
This way the attribute is defined:
group -em -name "plumber_grp";
addAttr -dt "stringArray" -ln "parts";
Ok so far, then I try to add a string to the array:
string $parts[] = getAttr "plumber\_grp.parts"
;
int $numParts = size($parts);
$parts[$numParts] ="test";
setAttr "plumber_grp.parts" -type "stringArray" $parts;
--> // Error: setAttr: Error reading data element number 3: test //
or I simply try
setAttr "plumber_grp.parts" -type "stringArray" "a" "b";
or
setAttr "plumber_grp.parts" -type "stringArray" {"a","b"};
--> // Error: setAttr: Error reading data element number 3: a //
Nothing works, any idea?
Thx peter