Is there a recommended way to access what applied API schemas are on a prim from Hydra in a straightforward way?
We’re trying to specialize rendering of existing prims schema types. This allows us to overlay our custom attributes on top of prims that can still be brought into off the shelf DCCs, without breaking workflows.
However, we’re not finding straight forward ways to query what applied api schemas exist on the prim once we’re on the Hydra side.
Is this by design, or is this just missing functionality?
If there isn’t an existing way to do this, I would perhaps advocate for adding it into Hydra because it feels like a very powerful way for renderers to specialize rendering without having to infer based on the existence of attributes.
Hi,
I don’t think I have the answer you expect…
But here is what I know :
I am not aware of any equivalent in Hydra of UsdPrim::GetAppliedSchemas or UsdPrim::HasAPI which is likely to be what you’re asking for for Hydra.
Usually what I’ve seen in Hydra code and the way we do it in maya hydra is by getting the desired schema from the HdSceneIndexPrim and checking if it is defined. Please have a look at :
But this doesn’t give you the full list of schemas available on a prim. But, if you apply custom schemas to prims and want to know if they are applied on the prims in the render delegate, that should work.
Regards,
David