Hi,
I am using UsdImagingPrimAdapter::SamplePrimvar to add primvar to my custom prim. I am using pxr::VtArraypxr::GfVec3f type for my primvar. How does USD tell if the VtValue is float3[]
or point3f[]
? You can author the specific data type in usd file but how to do it in procedural?
VtValue does not encode scene-types like float3
or point3f
. Primvar-processing code in usdImaging generally fetches the primvar’s “typeName” to reason about primvar “roles” for a GfVec3f (or whatever).
Thank you Sebastian. I found the _MergePrimvar() can be used to set the “role” of primvar.