secretalienlab
07-14-2005, 09:05 PM
Hello!
I'm having trouble setting a stringArray attr. My last attemt is below. It feels funny to build a (very) long string from my array when it's an array I want to set. I guess I'm missing something..
for($each in $sel){
for($each2 in $attr){
$line = $line+"\""+$each2+"\" ";
}
$n = size($attr);
setAttr ($each+".aGrpMem") -type stringArray ($n) ($line);
}
As far as I understand this would build the exact example from the docs.. ?
//Example setAttr node.stringArrayAttr -type stringArray 3 "a" "b" "c";
Here's my error msg: Error reading data element number 5:
Thanks!
-mattias
-------------
Well, what I get from searching the web is not much, mostly "consider other solutions".
Has anybody ever used this attr-type or is it there just for show?
When I assign values explicitly ("hey.tx" "yo.rx") it works as expected.
I'm having trouble setting a stringArray attr. My last attemt is below. It feels funny to build a (very) long string from my array when it's an array I want to set. I guess I'm missing something..
for($each in $sel){
for($each2 in $attr){
$line = $line+"\""+$each2+"\" ";
}
$n = size($attr);
setAttr ($each+".aGrpMem") -type stringArray ($n) ($line);
}
As far as I understand this would build the exact example from the docs.. ?
//Example setAttr node.stringArrayAttr -type stringArray 3 "a" "b" "c";
Here's my error msg: Error reading data element number 5:
Thanks!
-mattias
-------------
Well, what I get from searching the web is not much, mostly "consider other solutions".
Has anybody ever used this attr-type or is it there just for show?
When I assign values explicitly ("hey.tx" "yo.rx") it works as expected.
