fbb

fbb

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Get primvar values in parameter fields and wrangle nodes April 23, 2024, 12:47 p.m.

Hamilton Meathouse
vector value = usd_primvarelement(0, @primpath, "displayColor", 3); //Gets the third element in the array
usd_addprimvar(0, @primpath, "myval", "vector");
usd_setprimvar(0, @primpath, "myval", value);

That's not python. Is it hscript or vex? I've tried implementing this "usd_addprimvar" as hscript without success. I suspect this is vex meant for use in a wrangle.

... found the doc's for it - yeah, that's vex. This will be useful for when I need to work with a wrangle. Thank you.

Of course, I still haven't found a way to get a value from an array primvar into a parameter. At least not directly. I did come up with a workaround. The attribute I'm trying to access was created in a sopmodify node, so I just split the array into individual float attributes - these I know how to fetch. If you have a pre-existing array primvar whose values you need to fetch, I expect you could push this into a sopmodify node and, there, split the array to individual floats so that they are accessible downstream but... this really shouldn't be necessary.

Get primvar values in parameter fields and wrangle nodes April 22, 2024, 6:21 p.m.

Something else I'm stuck on: how to fetch a value from an array type primvar.

Get primvar values in parameter fields and wrangle nodes April 22, 2024, 5:19 p.m.

Update: if you put "ch("primpattern")" into the "GetPrimAtPath" method, that will use whatever primitive you specify in the "Primitives" field of the node which means you can use `lopinputprims('.', 0)` in the "Primitives" field to get the geo that is plugged into the input.