24 #ifndef USD_GENERATED_MODELAPI_H
25 #define USD_GENERATED_MODELAPI_H
30 #include "pxr/usd/usd/api.h"
35 #include "pxr/base/vt/value.h"
42 #include "pxr/base/tf/type.h"
44 PXR_NAMESPACE_OPEN_SCOPE
119 Get(
const UsdStagePtr &stage,
const SdfPath &path);
133 static const TfType &_GetStaticTfType();
135 static bool _IsTypedSchema();
139 const TfType &_GetTfType()
const override;
163 KindValidationModelHierarchy
322 bool _GetAssetInfoByKey(
const TfToken &key, T *val)
const {
346 #define USDMODEL_ASSET_INFO_KEYS \
350 (payloadAssetDependencies)
354 PXR_NAMESPACE_CLOSE_SCOPE
UsdModelAPI(const UsdSchemaBase &schemaObj)
Construct a UsdModelAPI on the prim held by schemaObj .
T const & UncheckedGet() const
Returns a const reference to the held object if the held object is of type T.
USD_API void SetAssetVersion(const std::string &version) const
Sets the model's asset version string.
virtual USD_API ~UsdModelAPI()
Destructor.
#define USDMODEL_ASSET_INFO_KEYS
A map with string keys and VtValue values.
bool IsHolding() const
Return true if this value is holding an object of type T, false otherwise.
USD_API void SetAssetName(const std::string &assetName) const
Sets the model's asset name to assetName.
USD_API void SetAssetInfo(const VtDictionary &info) const
Sets the model's assetInfo dictionary to info in the current edit target.
USD_API bool IsModel() const
Return true if this prim represents a model, based on its kind metadata.
The base class for all API schemas.
KindValidation
Option for validating queries to a prim's kind metadata.
USD_API bool GetKind(TfToken *kind) const
Retrieve the authored kind for this prim.
USD_API bool GetAssetName(std::string *assetName) const
Returns the model's asset name from the composed assetInfo dictionary.
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
static USD_API UsdModelAPI Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdModelAPI holding the prim adhering to this schema at path on stage.
USD_API VtValue GetAssetInfoByKey(const TfToken &keyPath) const
Return the element identified by keyPath in this object's composed assetInfo dictionary.
Token for efficient comparison, assignment, and hashing of known strings.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
std::vector< TfToken > TfTokenVector
Convenience types.
Represents an arbitrary dimensional rectangular container class.
A path value used to locate objects in layers or scenegraphs.
USD_API bool GetPayloadAssetDependencies(VtArray< SdfAssetPath > *assetDeps) const
Returns the list of asset dependencies referenced inside the payload of the model.
USD_API void SetPayloadAssetDependencies(const VtArray< SdfAssetPath > &assetDeps) const
Sets the list of external asset dependencies referenced inside the payload of a model.
USD_API bool IsKind(const TfToken &baseKind, KindValidation validation=KindValidationModelHierarchy) const
Return true if the prim's kind metadata is or inherits from baseKind as defined by the Kind Registry...
Contains an asset path and an optional resolved path.
USD_API bool SetKind(const TfToken &kind) const
Author a kind for this prim, at the current UsdEditTarget.
static USD_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...
USD_API bool GetAssetInfo(VtDictionary *info) const
Returns the model's composed assetInfo dictionary.
TfType represents a dynamic runtime type.
Singleton registry that provides access to schema type information and the prim definitions for regis...
USD_API bool GetAssetIdentifier(SdfAssetPath *identifier) const
Returns the model's asset identifier as authored in the composed assetInfo dictionary.
UsdModelAPI is an API schema that provides an interface to a prim's model qualities, if it does, in fact, represent the root prim of a model.
USD_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
USD_API void SetAssetIdentifier(const SdfAssetPath &identifier) const
Sets the model's asset identifier to the given asset path, identifier.
The base class for all schema types in Usd.
USD_API bool GetAssetVersion(std::string *version) const
Returns the model's resolved asset version.
bool IsEmpty() const
Returns true iff this value is empty.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
UsdModelAPI(const UsdPrim &prim=UsdPrim())
Construct a UsdModelAPI on UsdPrim prim .
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
USD_API bool IsGroup() const
Return true if this prim represents a model group, based on its kind metadata.
UsdPrim GetPrim() const
Return this schema object's held prim.