SquirkyTurtle 0 Report post Posted January 13 Hello, I am writing some code and I noticed something weird. I am using a detail wrangle and some loops. Inside one loop, I use setpointattrib() to update a point attribute and then, I read the updated value back using getattrib() to use it for a condition further down the line. I noticed that, even after updating my attribute in one iteration of the loop, it will still read in the default value it was set to before, not the new value, I set it to. Can anyone explain to me why this is? Am I doing something wrong? Thank you Share this post Link to post Share on other sites
f1480187 595 Report post Posted January 13 It's just not working that way in Houdini 16.5. First argument of all geometry functions is an input geometry, not the current one. By setting attributes you only pending value changes after the VEX code is executed, as far as I know. Common way is to use a pipeline of small wrangles. Other way is to use an array to store intermediate values, then add a small loop at the end of the code where you finally set values for geometry entities. Share this post Link to post Share on other sites
SquirkyTurtle 0 Report post Posted January 13 39 minutes ago, f1480187 said: It's just not working that way in Houdini 16.5. First argument of all geometry functions is an input geometry, not the current one. By setting attributes you only pending value changes after the VEX code is executed, as far as I know. Common way is to use a pipeline of small wrangles. Other way is to use an array to store intermediate values, then add a small loop at the end of the code where you finally set values for geometry entities. Hey thank you so much! I used an array and then just updated them in the end and it works fine now. Thank you again! Share this post Link to post Share on other sites