Let say that I have a control node with the following attributes:
int index
float size1
float size2
float size3
float size4
etc..
Now if I would want to let the index parameter control which of the size attributes to read from. How can I do that?
I tried the following which didn't work.
ch(“../null1/size`ch(”../null1/index“)`”)
However, if i write the following it does work:
ch(“../null1/size`$F`”)
The problem is that I'm trying to reach an attribute outside my Foreach SOP corresponding to the FORVALUE which as I access through stamping.
Could I perhaps somehow create a global variable just like $F and change it to the stamped value for each loop?
Expression within expression
2230 2 1- xtimmyx
- Member
- 166 posts
- Joined: Oct. 2008
- Offline
- edward
- Member
- 7722 posts
- Joined: July 2005
- Offline
xtimmyx
I tried the following which didn't work.
ch(“../null1/size`ch(”../null1/index“)`”)
Your syntax is wrong. Backquotes (`) are only used to get INTO the expression language (eg. from string parameters). It has no meaning if you're already in the expression language (eg. when the parameter is green).
Therefore, the corrected (untested) syntax should be more like
ch(“../null1/size” + chs(“../null1/index”))
- xtimmyx
- Member
- 166 posts
- Joined: Oct. 2008
- Offline
edward
Your syntax is wrong. Backquotes (`) are only used to get INTO the expression language (eg. from string parameters). It has no meaning if you're already in the expression language (eg. when the parameter is green).
Therefore, the corrected (untested) syntax should be more like
ch(“../null1/size” + chs(“../null1/index”))
Works perfectly. Thanks!
-
- Quick Links