Hello all,
I'm trying to pass detail string attribute with edge pattern (p1-0 p2-3 etc.) to group field in dissolve node, but it doesn't work. Anyone has an idea why?
Edit: it works if I just manually copy and paste the pattern string from detail string attribute I've created previously.
Mikas
Detail function doesn't read string attribute [SOLVED]
13427 4 2- Mikas
- Member
- 11 posts
- Joined:
- Offline
- bonsak
- Member
- 459 posts
- Joined: 10月 2011
- Offline
- jlait
- スタッフ
- 6413 posts
- Joined: 7月 2005
- Offline
There are two common languages in Houdini, VEX and our Expression language. The backticks in the group field are invoking our expression language. In the expression language, there are two named functions to get detail attributes, `detail` and `details`. The first returns a float and takes an index into the attribute (so you can get components of a vector). The second returns a string and has no index.
Thus, there are some changes needed
1) A terminating backtick.
2) Use details, not detail.
3) Remove the 0 parameter
VEX, OTOH, shows up in Wrangles and the Attribute Expression node. It also uses detail to access detail attributes, but because VEX can overload on return type, there is only one version that works for vectors, strings, and floats.
Thus, there are some changes needed
1) A terminating backtick.
2) Use details, not detail.
3) Remove the 0 parameter
`details("../set_dissolve_string", "edge_string")`
VEX, OTOH, shows up in Wrangles and the Attribute Expression node. It also uses detail to access detail attributes, but because VEX can overload on return type, there is only one version that works for vectors, strings, and floats.
- Mikas
- Member
- 11 posts
- Joined:
- Offline
Thank you, that's an interesting solution, though not exactly what I was looking for. But definitely worth knowing.
bonsak
Wouldn't it be easier to do this with a group?
Mikas Sadauskas
http://vfx.miko.lt [vfx.miko.lt]
http://vfx.miko.lt [vfx.miko.lt]
- Mikas
- Member
- 11 posts
- Joined:
- Offline
Great! I new that I miss just some small thing in there. Thank you very much, really good to know it!
jlait
`details(“../set_dissolve_string”, “edge_string”)`
Mikas Sadauskas
http://vfx.miko.lt [vfx.miko.lt]
http://vfx.miko.lt [vfx.miko.lt]
-
- Quick Links