Solaris foreatch: Local variable 'ITERATIONVALUE' not found.

   2507   4   0
User Avatar
Member
14 posts
Joined: Aug. 2016
Offline
Hi! I have problem. Node in foreatch Solaris not founded default variable “ITERATIONVALUE” when foreatch is created. I was assembly simple scene for example. Node transform in Loop must to scaling eatch geometry to zero value. But it's not work. Why? Help me!
Edited by AlexCubor - Aug. 27, 2020 05:23:55

Attachments:
solaris_foreatch.hip (56.5 KB)

User Avatar
Staff
4438 posts
Joined: July 2005
Online
This is a known issue that has been fixed for the next release. The problem is that you are asking the node inside the for each loop to cook on its own. Because you are cooking it directly, rather than having the for each LOP cook it, there is no value set for the ITERATIONVALUE context option (it's the For Each LOP that sets this value and passes it to the cook method of the input LOP).

Also, feeding the node from inside the for each loop into the first input as well as the third input of the For Each node is unlikely to ever work, and I'm not clear what you're trying to accomplish there. The ITERATIONVALUE will never be set cooking that first input, so you'll always get a warning/unexpected results through that first input. You can probably just disconnect that node from the first input? Or, depending on what you're trying to accomplish, you may want to connect the node from above the “begin for each” node into that first input?
User Avatar
Member
14 posts
Joined: Aug. 2016
Offline
Ok! Thank you for the help! I will wait for the next release…
User Avatar
Member
13 posts
Joined: April 2019
Offline
Hi
I have the same problem on houdini 19.0. I don't have the possibility to switch houdini version.
The for loop still works as expected, the problem is that I have an error message every time I open a scene with this setup. It's inside a LOP HDA.


mtucker
This is a known issue that has been fixed for the next release. The problem is that you are asking the node inside the for each loop to cook on its own. Because you are cooking it directly, rather than having the for each LOP cook it, there is no value set for the ITERATIONVALUE context option (it's the For Each LOP that sets this value and passes it to the cook method of the input LOP).

I'm open to modify my setup, but I'm not sure I understand this message.
How would I make the for each lop cook rather than letting the nodes inside cooking "directly"?

I tried setting a Context Option variable beforehand with `hou.setContextOption('ITERATION', 1)` to bypass the problem but this does not seem to change anything.
Edited by BenWall - July 28, 2023 06:12:40
User Avatar
Member
7 posts
Joined: March 2020
Offline
have you ever found a solution to this? I'm trying to use a for each loop in h19.5, targeting the ITERATION dont work consistently.
Sometimes enabling and disabling the for each end node makes it work for a bit but not always...
  • Quick Links