Simple syntax help

   1557   2   0
User Avatar
Member
5 posts
Joined: May 2018
Offline
Hello,

I have created for each loop for every grid object on my scene. And I want to put a different texture map for everyone one of them. So on a null node I created 4 file-image-string box from editing parameter interface. And their names are HeightFile1, HeightFile2, HeighFile3, HeightFile4. And I converted iteration integer to a string from for each loop metadata with the code bellow.

i@iterationPlusOne = detail(1,"iteration",0) + 1;
s@stringedIteration = itoa(@iterationPlusOne);


So this is the part that I couldn't solve for 3-4 hours. I want to read stringedIteration attribute from details and put it next to the ../TileControls/HeightFile. So For every iteration it will be TileControls/HeightFile1 2 3 4.

This is the syntax. Can you please help. Thank you so much.

chs("../TileControls/HeightFile" + detail(0,stringedIteration,0))

Attachments:
Screen Shot 2022-08-30 at 05.01.08 (0-00-00-00).png (1.7 MB)

User Avatar
Member
5125 posts
Joined: Feb. 2012
Offline
Hi,

You need to use the details expression:

details(0,stringedIteration)
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
User Avatar
Member
5 posts
Joined: May 2018
Offline
animatrix_
Hi,

You need to use the details expression:

details(0,stringedIteration)


Thank you so much. You saved me a lot of time. I thought detail can read any attribute but for strings I didn't know I had to use details
Edited by cinemator - Aug. 30, 2022 10:17:24
  • Quick Links