I have a detail integer array attribute on a VEX wrangle node and now I want to drive some SOP loops with that. (For each element in the array I want to do something the amount of times the value of the loop). I also made the lenght of the array a detail attribute, so I was able to drive a For loop with that.
How can I get the values of each array element?
(I am very familiar with the detail(“../node”,“iteraition”,0) and the meta node bit).
I expected it would be something like: detail(“../myVexNode”,“my_array”,detail(“../metaEachStorey”,“iteration”,0)).
But that doesnt seem to work.
Thanks in advance!
How do I use an array attribute in houdini expression or python
4536 2 0- DASD
- Member
- 453 posts
- Joined: Feb. 2013
- Offline
- Nima
- Member
- 471 posts
- Joined: Nov. 2013
- Offline
Greetings.
In expression function you should use something like:
detail(“address of your node”, “attribute name”, index of your attribute)
For instance if you want third element of an array you should write:
detail(“../node”,“iteraition”,2)
Relative module in python returns an of requested attribute and you can get each index of it with a pair of brackets afterwards.
In expression function you should use something like:
detail(“address of your node”, “attribute name”, index of your attribute)
For instance if you want third element of an array you should write:
detail(“../node”,“iteraition”,2)
Relative module in python returns an of requested attribute and you can get each index of it with a pair of brackets afterwards.
Edited by Nima - Nov. 21, 2016 01:32:22
- DASD
- Member
- 453 posts
- Joined: Feb. 2013
- Offline
-
- Quick Links