Hi, is there an expression that tests whether a volume exists? hasprim sounds like it does that but it requires a group, and the third parameter is a prim index, and I'd like to check by name.
To give some context, I'm trying to determine whether the node wired into an input on my asset contains a volume, and use a switch to either pass that volume directly to a volume wrangle, or convert it to a volume and then pass that into the volume wrangle.
Expression to check whether input contains a specific volume?
2747 2 1- Lyubomir Popov
- Member
- 29 posts
- Joined: 10月 2015
- Offline
- tamte
- Member
- 8619 posts
- Joined: 7月 2007
- Offline
you can for example use:
that would switch if it doesn't find any primitive with name attribute “surface”, however would not ensure it is a volume primitive
you can as well in separate stream delete all nonvolume primitives and blast everything except your desired name, then just check if there is anything left in that geo from your switch
argc(listbyvals(opinputpath(".",0), D_PRIMITIVE, "name", "surface"))==0
you can as well in separate stream delete all nonvolume primitives and blast everything except your desired name, then just check if there is anything left in that geo from your switch
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- Lyubomir Popov
- Member
- 29 posts
- Joined: 10月 2015
- Offline
-
- Quick Links