createConstantPrimvar#
Fully qualified name: usdex::core::createConstantPrimvar
- pxr::UsdGeomPrimvar usdex::core::createConstantPrimvar(
- pxr::UsdPrim prim,
- const std::string &name,
- const pxr::GfVec3f &value,
- const pxr::SdfValueTypeName &valueTypeName = pxr::SdfValueTypeName(),
Create and author a constant primvar on a prim from a single vector 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 value type for the primvar attribute. When omitted,
Float3Arrayis used.Color3fArray,Normal3fArray, andPoint3fArrayare also supported. The scalar typesColor3f,Normal3f, andPoint3fare accepted as aliases and are converted to their corresponding array types internally.
- Returns:
The authored
UsdGeomPrimvar, or an invalid one if authoring failed.