Detail function doesn't read string attribute [SOLVED]

   13132   4   2
User Avatar
Member
11 posts
Joined:
Offline
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
Edited by Mikas - 2017年3月14日 10:29:33

Attachments:
detail_string_attribute.hip (73.7 KB)

Mikas Sadauskas
http://vfx.miko.lt [vfx.miko.lt]
User Avatar
Member
459 posts
Joined: 10月 2011
Offline
Hi
Wouldn't it be easier to do this with a group?

-b

Attachments:
detail_string_attribute_2.hip (73.8 KB)

http://www.racecar.no [www.racecar.no]
User Avatar
スタッフ
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

`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.
User Avatar
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]
User Avatar
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]
  • Quick Links