Hello guys.
In old for loop VOP there was a parameter called step for increment but Anyone knows how to change increment of new for loop in VOPs?
Seems Houdini always tends to increase index by 1!
Thanks in advance.
Increment of New For Loop VOP
2718 5 0- Nima
- Member
- 471 posts
- Joined: Nov. 2013
- Offline
- jlait
- Staff
- 6205 posts
- Joined: July 2005
- Offline
The loop index always increments by one.
a) You could use a while loop and do the increment yourself.
b) You could multiply the index value by your step size inside the loop
c) You could add an extra variable that you feed back that increments by your step size to go along with the base increment.
b & c require dividing your length by step size.
a) You could use a while loop and do the increment yourself.
b) You could multiply the index value by your step size inside the loop
c) You could add an extra variable that you feed back that increments by your step size to go along with the base increment.
b & c require dividing your length by step size.
- Nima
- Member
- 471 posts
- Joined: Nov. 2013
- Offline
- jlait
- Staff
- 6205 posts
- Joined: July 2005
- Offline
- Nima
- Member
- 471 posts
- Joined: Nov. 2013
- Offline
- jlait
- Staff
- 6205 posts
- Joined: July 2005
- Offline
How is is that not a real while loop?
is equivalent to
The only difference is typing, which isn't an issue when the code is auto-generated.
It is hard to express a true while loop in VOPs because your continue condition depends on fed-back wires, while the initial condition can't depend on fed-back wires.
Attached shows that previous example as a while loop.
if (foo) { do { } while (foo) }
is equivalent to
while (foo) { }
The only difference is typing, which isn't an issue when the code is auto-generated.
It is hard to express a true while loop in VOPs because your continue condition depends on fed-back wires, while the initial condition can't depend on fed-back wires.
Attached shows that previous example as a while loop.
-
- Quick Links