Get/set tuple arrays in VEX

   2018   1   0
User Avatar
Member
140 posts
Joined: July 2005
Offline
It's been a while since I rode this horse into battle, but I'm back in VEX hell with a fresh question:

How do I access the values of sourceprimuv attribute generated by the Intersection Analysis SOP?

the generated attribute takes the form:
[ (0.4522335, 0.0, 0.0), (0.2454474, 0.0, 0.0) ]

Every attempt to get at this thing with getattrib() or using a dot operator errors out.

The half-assed way would be to do it in Python, but I'd really rather not break out of this wrangle node to do something that VEX should be able to handle. I should be able to read that attribute in VEX, right?

Cheers!
User Avatar
Member
4495 posts
Joined: Feb. 2012
Offline
Hi,

You can do:

array[index];
array[index].x;
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
  • Quick Links