Simple problem: I have a foreach loop running over points on a curve each with an attribute that is randomized for which variety of geometry it needs to use.
The varieties are coming from 1 input, but where each variety has a different primitive attribute for which variety it is (I get the geometry in from Unity).
I got the geometry getting piped in to a copy to points node, in the foreach, but before that I need to delete, per loop, what is not used. Or I need to pick it, I don't know.
I just need the loop to select a variety based on the randomly generated attribute.
So the way I did it was with a delete node, with an expression with the following python code:
curVal = hou.pwd().curPrim().attribValue("namechoice")
compareVal = hou.node("../foreach_plank_start").geometry().point(0).attribValue("nameselect")
if curVal != compareVal:
Comparing the primitive attribute (int) with the point attribute (int).
But.. I get this error:
Error: Unable to evaluate expression (
Traceback (most recent call last):
File "<stdin>", line 3, in expression
AttributeError: 'Geometry' object has no attribute 'point'
Explanations to why hou.Geometry.point() is not "valid", suggestions for other ways to code it or suggestions for other way to do the network are most welcome!