VEX: check if attrib/primvar is blocked?

   375   2   2
User Avatar
Member
242 posts
Joined: 10月 2014
Offline
Is there a vex command or flag to check if an attrib/primvar is blocked? Not finding anything here [www.sidefx.com]. Is there some hidden metadata I can query?
- Tim Crowson
Technical/CG Supervisor
User Avatar
Member
242 posts
Joined: 10月 2014
Offline
Ah! Looks like I can just run usd_isattrib(), which seems to treat blocked attrs as 'invalid'.

https://www.sidefx.com/docs/houdini/vex/functions/usd_isattrib.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/vex/functions/usd_isprimvar.html [www.sidefx.com]
Edited by Tim Crowson - 2024年7月25日 14:22:41
- Tim Crowson
Technical/CG Supervisor
User Avatar
スタッフ
491 posts
Joined: 6月 2020
Offline
There *is* some "hidden" metadata, but I'm not sure we expose the blocked status in a way that's necessarily easily identified.

For example, if I block a Sphere prim's radius, I can query

usd_metadata(0, usd_makeattribpath(0, "/sphere1", "radius"), "default");

Which returns 0.0, which is evidently our representation of Sdf.ValueBlock.
Edited by robp_sidefx - 2024年7月26日 10:39:55
  • Quick Links