ktpr
05-29-2003, 04:05 AM
before I write anything else I want to thank the people that have replied to my posts. Hell, I want to thank everybody :) I've learned a lot and I wouldn't be anywhere without you people. :applause::love:
---
I've created a node that I want to hold a series of attributes that contain arrays, like "obj.attr1" = [3, 23, 233]. I can set the array and apparently fill it with values, and reset it, but I can't get my information.
as usual, here's code illustrating the problem:
===
createNode "network" -n "uv";
addAttr -longName "somename" -dt Int32Array;
print(listAttr( "-ud"));
setAttr uv.somename -type Int32Array 2 124 21;
// hey look I can reset the values.
setAttr uv.somename -type Int32Array 3 124 21 32;
// it has something in it
int $s = `getAttr -size uv.somename`;
print ($s);
// and I can't see to get at it.
int $a[] = `getAttr uv.somename`;
getAttr uv.somename[0];
===
if this way is a dead end what way would there be using nodes and attributes to have a variable sized atrribute, something like this:
node_name--|
"foo" <-- dynamic attribute
|
454 <-- value # 1
12 <-- value # 2
....
45 <-- value # 7
"bar"
|
45 <-- value # 1
122 <-- value # 2
....
5 <-- value # 4
.... and so forth
where I could access by node_name.value1[x].
thanks for your time
ktpr
ktpr
---
I've created a node that I want to hold a series of attributes that contain arrays, like "obj.attr1" = [3, 23, 233]. I can set the array and apparently fill it with values, and reset it, but I can't get my information.
as usual, here's code illustrating the problem:
===
createNode "network" -n "uv";
addAttr -longName "somename" -dt Int32Array;
print(listAttr( "-ud"));
setAttr uv.somename -type Int32Array 2 124 21;
// hey look I can reset the values.
setAttr uv.somename -type Int32Array 3 124 21 32;
// it has something in it
int $s = `getAttr -size uv.somename`;
print ($s);
// and I can't see to get at it.
int $a[] = `getAttr uv.somename`;
getAttr uv.somename[0];
===
if this way is a dead end what way would there be using nodes and attributes to have a variable sized atrribute, something like this:
node_name--|
"foo" <-- dynamic attribute
|
454 <-- value # 1
12 <-- value # 2
....
45 <-- value # 7
"bar"
|
45 <-- value # 1
122 <-- value # 2
....
5 <-- value # 4
.... and so forth
where I could access by node_name.value1[x].
thanks for your time
ktpr
ktpr
