検索 - User list
Full Version: Vex expressions with Usd ?
Root » Solaris and Karma » Vex expressions with Usd ?
Sixjames1000
How I can target primitives with a certain attribute value for a collection? Or in other words, how to use attributes a Vexpression for something in lops?

I want to create a collection for that includes primitives given the value of an attribute they have.
Image Not Found


Any help is appreciated !

Thanks
mtucker
It's the same format as the VEXpressions you can put in any Primitive Pattern field in LOPs, described here: https://www.sidefx.com/docs/houdini/solaris/pattern.html [www.sidefx.com]

All the USD related VEX functions start with “usd_”, so they're easy to find in the VEX documentation.
jsmack
How would one make a VEXpression that compares a primvar value?

I attempted to do
v[]@primvars:displayColor[0].r > 0.5;
and it hanged so bad I did't even get a core file when I killed it.
npetit
try

vector(usd_primvarelement(0, s@primpath, "displayColor", 0)).r > 0.5
jsmack
npetit
try

vector(usd_primvarelement(0, s@primpath, "displayColor", 0)).r > 0.5

okay. That sounds equivalent though.
jason_iversen
jsmack
That sounds equivalent though.

I haven't looked into it but I think your would requires that primvar is, or assume all primvars are, bound to a VEX variable. Using the query function as per Nick's example doesn't have that requirement.
jsmack
jason_iversen
jsmack
That sounds equivalent though.

I haven't looked into it but I think your would requires that primvar is, or assume all primvars are, bound to a VEX variable. Using the query function as per Nick's example doesn't have that requirement.

Right, I guess I assumed they would be, but maybe not. Maybe they are only bound in the context of wrangles?
rafal
jsmack
I attempted to do
v[]@primvars:displayColor[0].r > 0.5;
and it hanged so bad I did't even get a core file when I killed it.
This should be fixed in tomorrow's H18.0.446.
Sixjames1000
Awesome!
Thanks
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB