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
USD_API void SetAssetName(const std::string &assetName) const
Sets the model's asset name to assetName.
UsdModelAPI(const UsdSchemaBase &schemaObj)
Construct a UsdModelAPI on the prim held by schemaObj .
virtual USD_API ~UsdModelAPI()
Destructor.
T const & UncheckedGet() const &
Returns a const reference to the held object if the held object is of type T.
#define USDMODEL_ASSET_INFO_KEYS
USD_API bool GetAssetInfo(VtDictionary *info) const
Returns the model's composed assetInfo dictionary.
USD_API void SetPayloadAssetDependencies(const VtArray< SdfAssetPath > &assetDeps) const
Sets the list of external asset dependencies referenced inside the payload of a model.
A map with string keys and VtValue values.
USD_API void SetAssetIdentifier(const SdfAssetPath &identifier) const
Sets the model's asset identifier to the given asset path, identifier.
UsdPrim GetPrim() const
Return this schema object's held prim.
The base class for all API schemas.
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.
KindValidation
Option for validating queries to a prim's kind metadata.
USD_API void SetAssetVersion(const std::string &version) const
Sets the model's asset version string.
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.
Token for efficient comparison, assignment, and hashing of known strings.
USD_API VtValue GetAssetInfoByKey(const TfToken &keyPath) const
Return the element identified by keyPath in this object's composed assetInfo dictionary.
bool IsEmpty() const
Returns true iff this value is empty.
USD_API bool IsModel() const
Return true if this prim represents a model, based on its kind metadata.
USD_API bool GetAssetIdentifier(SdfAssetPath *identifier) const
Returns the model's asset identifier as authored in the composed assetInfo dictionary.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
USD_API bool SetKind(const TfToken &kind) const
Author a kind for this prim, at the current UsdEditTarget.
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 bool GetKind(TfToken *kind) const
Retrieve the authored kind for this prim.
USD_API bool IsGroup() const
Return true if this prim represents a model group, based on its kind metadata.
USD_API bool GetAssetVersion(std::string *version) const
Returns the model's resolved asset version.
Contains an asset path and an optional resolved path.
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...
TfType represents a dynamic runtime type.
Singleton registry that provides access to schema type information and the prim definitions for regis...
USD_API void SetAssetInfo(const VtDictionary &info) const
Sets the model's assetInfo dictionary to info in the current edit target.
UsdModelAPI is an API schema that provides an interface to a prim's model qualities,...
USD_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
USD_API bool GetAssetName(std::string *assetName) const
Returns the model's asset name from the composed assetInfo dictionary.
The base class for all schema types in Usd.
bool IsHolding() const
Return true if this value is holding an object of type T, false otherwise.
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.