Confused about 2nd inputs to attribute wrangles

   849   2   2
User Avatar
Member
73 posts
Joined: April 2020
Online
Dear Houdini VEX Experts,

I have several newbie questions and haven’t succeeded in finding a previous post that seems to answer them.

1) If an attribute wrangle has two inputs, is it possible to iterate over the elements of the second input inside the wrangle?
2) My understanding is that I can set attributes on elements of that second input using, say,
setpointattrib(1, "attrName", elementNum, value, "set");
But I don’t see then how to access that modified version of the second geometry. I did see a post saying you can’t manipulate the 2nd geometry, but would that constraint include setting attributes? If so, why is there a parameter specifying which geometry to set the attribute on?
3) Is it possible to output that second geometry from the wrangle somehow?

Thanks for any guidance you can provide,
Mary
User Avatar
Member
359 posts
Joined: April 2017
Offline
You're not really able to modify any properties of geometry going into any inputs other than the first input. The magic of VEX parallelism in wrangles unfortunately comes with some limitations. Same goes for iteration... the built-in "Run Over" iteration is only going to work on the first input. You'll probably need to rethink how you're structuring your code to work within these constraints.
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
73 posts
Joined: April 2020
Online
Thank you, toadstorm, I will ponder how to restructure things. It's good at least to know I'm not imagining the difficulties!

Best wishes,
Mary
  • Quick Links