24 #ifndef USDGEOM_GENERATED_PRIMVARSAPI_H 25 #define USDGEOM_GENERATED_PRIMVARSAPI_H 30 #include "pxr/usd/usdGeom/api.h" 35 #include "pxr/usd/usdGeom/primvar.h" 37 #include "pxr/base/vt/value.h" 44 #include "pxr/base/tf/type.h" 46 PXR_NAMESPACE_OPEN_SCOPE
129 Get(
const UsdStagePtr &stage,
const SdfPath &path);
143 static const TfType &_GetStaticTfType();
145 static bool _IsTypedSchema();
149 const TfType &_GetTfType()
const override;
194 int elementSize = -1)
const;
209 template <
typename T>
215 int elementSize = -1,
237 template <
typename T>
242 const VtIntArray &indices,
244 int elementSize = -1,
381 const std::vector<UsdGeomPrimvar> &inheritedFromAncestors)
const;
409 const std::vector<UsdGeomPrimvar> &inheritedFromAncestors)
const;
428 const std::vector<UsdGeomPrimvar> &inheritedFromAncestors)
const;
455 PXR_NAMESPACE_CLOSE_SCOPE
USDGEOM_API std::vector< UsdGeomPrimvar > GetPrimvarsWithValues() const
Like GetPrimvars(), but include only primvars that have some value, whether it comes from authored sc...
USDGEOM_API bool RemovePrimvar(const TfToken &name)
Author scene description to delete an attribute on this prim that was recognized as Primvar (i....
USDGEOM_API bool SetIndices(const VtIntArray &indices, UsdTimeCode time=UsdTimeCode::Default()) const
Sets the indices value of the indexed primvar at time.
static USDGEOM_API bool CanContainPropertyName(const TfToken &name)
Test whether a given name contains the "primvars:" prefix.
UsdGeomPrimvar CreateNonIndexedPrimvar(const TfToken &name, const SdfValueTypeName &typeName, const T &value, const TfToken &interpolation=TfToken(), int elementSize=-1, UsdTimeCode time=UsdTimeCode::Default()) const
Author scene description to create an attribute and authoring a value on this prim that will be recog...
Represents a value type name, i.e.
USDGEOM_API void BlockPrimvar(const TfToken &name)
Remove all time samples on the primvar and its associated indices attr, and author a block default va...
USDGEOM_API UsdGeomPrimvar FindPrimvarWithInheritance(const TfToken &name) const
Like GetPrimvar(), but if the named primvar does not exist or has no authored value on this prim,...
UsdGeomPrimvarsAPI(const UsdPrim &prim=UsdPrim())
Construct a UsdGeomPrimvarsAPI on UsdPrim prim .
The base class for all API schemas.
USDGEOM_API void BlockIndices() const
Block the indices that were previously set.
USDGEOM_API bool HasPrimvar(const TfToken &name) const
Is there a defined Primvar name on this prim?
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
UsdGeomPrimvarsAPI encodes geometric "primitive variables", as UsdGeomPrimvar, which interpolate acro...
USDGEOM_API std::vector< UsdGeomPrimvar > GetPrimvars() const
Return valid UsdGeomPrimvar objects for all defined Primvars on this prim, similarly to UsdPrim::GetA...
Token for efficient comparison, assignment, and hashing of known strings.
static USDGEOM_API UsdGeomPrimvarsAPI Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdGeomPrimvarsAPI holding the prim adhering to this schema at path on stage.
USDGEOM_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
USDGEOM_API std::vector< UsdGeomPrimvar > FindPrimvarsWithInheritance() const
Find all of the value-producing primvars either defined on this prim, or inherited from ancestor prim...
USDGEOM_API UsdGeomPrimvar CreatePrimvar(const TfToken &name, const SdfValueTypeName &typeName, const TfToken &interpolation=TfToken(), int elementSize=-1) const
Author scene description to create an attribute on this prim that will be recognized as Primvar (i....
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
static USDGEOM_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
Return a vector of names of all pre-declared attributes for this schema class and all its ancestor cl...
USDGEOM_API std::vector< UsdGeomPrimvar > GetPrimvarsWithAuthoredValues() const
Like GetPrimvars(), but include only primvars that have an authored value.
USDGEOM_API bool HasPossiblyInheritedPrimvar(const TfToken &name) const
Is there a Primvar named name with an authored value on this prim or any of its ancestors?
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
std::vector< TfToken > TfTokenVector
Convenience types.
A path value used to locate objects in layers or scenegraphs.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
virtual USDGEOM_API ~UsdGeomPrimvarsAPI()
Destructor.
UsdAttribute const & GetAttr() const
Explicit UsdAttribute extractor.
bool Set(const T &value, UsdTimeCode time=UsdTimeCode::Default()) const
Set the value of this attribute in the current UsdEditTarget to value at UsdTimeCode time,...
USDGEOM_API std::vector< UsdGeomPrimvar > FindIncrementallyInheritablePrimvars(const std::vector< UsdGeomPrimvar > &inheritedFromAncestors) const
Compute the primvars that can be inherited from this prim by its child prims, starting from the set o...
Contains an asset path and an optional resolved path.
static constexpr UsdTimeCode Default()
Produce a UsdTimeCode representing the sentinel value for 'default'.
UsdGeomPrimvarsAPI(const UsdSchemaBase &schemaObj)
Construct a UsdGeomPrimvarsAPI on the prim held by schemaObj .
TfType represents a dynamic runtime type.
Singleton registry that provides access to schema type information and the prim definitions for regis...
Schema wrapper for UsdAttribute for authoring and introspecting attributes that are primvars.
USDGEOM_API std::vector< UsdGeomPrimvar > FindInheritablePrimvars() const
Compute the primvars that can be inherited from this prim by its child prims, including the primvars ...
UsdGeomPrimvar CreateIndexedPrimvar(const TfToken &name, const SdfValueTypeName &typeName, const T &value, const VtIntArray &indices, const TfToken &interpolation=TfToken(), int elementSize=-1, UsdTimeCode time=UsdTimeCode::Default()) const
Author scene description to create an attribute and authoring a value on this prim that will be recog...
The base class for all schema types in Usd.
USDGEOM_API std::vector< UsdGeomPrimvar > GetAuthoredPrimvars() const
Like GetPrimvars(), but include only primvars that have some authored scene description (though not n...
USDGEOM_API UsdGeomPrimvar GetPrimvar(const TfToken &name) const
Return the Primvar object named by name, which will be valid if a Primvar attribute definition alread...
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...