createConstantPrimvar#
Fully qualified name: usdex::core::createConstantPrimvar
- pxr::UsdGeomPrimvar usdex::core::createConstantPrimvar(
- pxr::UsdPrim prim,
- const std::string &name,
- const pxr::TfToken &value,
- const pxr::SdfValueTypeName &valueTypeName = pxr::SdfValueTypeName(),
Create and author a constant primvar on a prim from a single scalar value.
This is an overloaded member function, provided for convenience. It differs from the above function only in what arguments it accepts.
- Parameters:
prim – The prim on which to create the primvar
name – The primvar name (not including the
primvars:prefix)value – The constant primvar value
valueTypeName – Optional USD array value type for the primvar attribute. When omitted,
TokenArrayis used.
- Returns:
The authored
UsdGeomPrimvar, or an invalid one if authoring failed.