Search - User list
Full Version: Simple question on "For each loop" (newb)
Root » Work in Progress » Simple question on "For each loop" (newb)
Harry_S
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)
tamte
you need to use points() [www.sidefx.com] function to get value of string attribute, not point()

so either
- switch the type of your Num attribute to Integer and it should work as is

or

- keep it as string, but use
`points("../foreach_begin1", 0, "Num")`
Harry_S
tamte
you need to use points() [www.sidefx.com] function to get value of string attribute, not point()

so either
- switch the type of your Num attribute to Integer and it should work as is

or

- keep it as string, but use
`points("../foreach_begin1", 0, "Num")`

The "points" variant worked! Its the easiest way to fix that (from all I've been suggested). Thank you. Just need to understand why "point" version haven't worked.
tamte
Harry_S
Just need to understand why "point" version haven't worked
It's because the s in points stands for string rather than points meaning plural, as confusing as it may seem
So point vs points is literally numerical attribute vs string attribute
Mike_A
It seems odd to me that no one proposed "point_s" as a better choice.
kodra
Mike_A
It seems odd to me that no one proposed "point_s" as a better choice.

This is a quite old thread from July...

By the way HScript expressions are really really old, probably older than some people on this forum. People who named it might have retired. By then people might have a very different idea on what a good naming convention was.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB