Jump to content

Simple question on "For each loop" (newb)


Recommended Posts

Hi guys.
Im at the very beginning of my Houdini journey so Im sorry for such a newb question (might be easy to answer tho).
While learning "for each" method of copying I decided to make my own version of a test scene but it shows all numbers as zeros instead of 0 to 81 numbers.
What can be the problem how do you think? 

Thanx.

PS : Actually my setup is almost identical to the one that Houdini has in its official tutor. (with exception that my parameter that should change on each iteration is string (font node)  and original is number of division (geometry node) 

363049678_6777189935638938_4762076662905642588_n.jpg

Link to comment
Share on other sites

I would recommend not using hscript anymore if you can avoid it, since being phasing out slowly, instead use @ptnum, also instead of a string just use an integer. 

You could also do the same using the create metadata node and use the "iteration" detail attrib and on the font for both options you can use the spare input as well. 

image.thumb.png.174d25a78626ac5a9a78c12eba216cb6.png

examples.hip

Link to comment
Share on other sites

18 hours ago, Sepu said:

I would recommend not using hscript anymore if you can avoid it, since being phasing out slowly, instead use @ptnum, also instead of a string just use an integer. 

You could also do the same using the create metadata node and use the "iteration" detail attrib and on the font for both options you can use the spare input as well. 

image.thumb.png.174d25a78626ac5a9a78c12eba216cb6.png

examples.hip 112.24 kB · 3 downloads

Wow, thanx a lot !

I also found another way to fix that (which makes me even more confused) by simple changing point to points like that  :     `point("../foreach_begin1", 0, "Num", 0)`   to   `points("../foreach_begin1", 0, "Num")`   I still dont know why points + string works just like point + integer. Do you have any idea ?

Also how do you make ""spare input" and what is it used for ?

And how link to your node is substituted to -1 ?  -1 means "one step backwards within current node tree" or something ?

 

Thank you

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...