24 #ifndef USD_GENERATED_COLLECTIONAPI_H 25 #define USD_GENERATED_COLLECTIONAPI_H 30 #include "pxr/usd/usd/api.h" 41 #include "pxr/base/vt/value.h" 48 #include "pxr/base/tf/type.h" 50 PXR_NAMESPACE_OPEN_SCOPE
230 Get(
const UsdStagePtr &stage,
const SdfPath &path);
241 static std::vector<UsdCollectionAPI>
276 std::string *whyNot=
nullptr);
312 static const TfType &_GetStaticTfType();
314 static bool _IsTypedSchema();
318 const TfType &_GetTfType()
const override;
459 const SdfPath &collectionPath);
488 const TfToken &collectionName);
521 const UsdStageWeakPtr &stage,
532 const UsdStageWeakPtr &stage,
583 bool Validate(std::string *reason)
const;
618 void _ComputeMembershipQueryImpl(
620 const SdfPathSet &chainedCollectionPaths,
621 bool *foundCircularDependency=
nullptr)
const;
624 PXR_NAMESPACE_CLOSE_SCOPE
static USD_API UsdCollectionAPI GetCollection(const UsdStagePtr &stage, const SdfPath &collectionPath)
Returns the collection represented by the given collection path, collectionPath on the given USD stag...
USD_API bool HasNoIncludedPaths() const
Returns true if the collection has nothing included in it.
unspecified UsdPrimDefaultPredicate
The default predicate used for prim traversals in methods like UsdPrim::GetChildren,...
USD_API UsdRelationship CreateIncludesRel() const
See GetIncludesRel(), and also Create vs Get Property Methods for when to use Get vs Create.
USD_API UsdRelationship GetExcludesRel() const
Specifies a list of targets that are excluded below the included paths in this collection.
Represents a flattened view of a collection.
USD_API UsdCollectionMembershipQuery ComputeMembershipQuery() const
Computes and returns a UsdCollectionMembershipQuery object which can be used to query inclusion or ex...
The base class for all API schemas.
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
USD_API bool ExcludePath(const SdfPath &pathToExclude) const
Excludes or removes the given path, pathToExclude from the collection.
UsdSchemaKind
An enum representing which kind of schema a given schema class belongs to.
USD_API UsdAttribute GetIncludeRootAttr() const
Boolean attribute indicating whether the pseudo-root path </> should be counted as one of the include...
Token for efficient comparison, assignment, and hashing of known strings.
static USD_API std::vector< UsdCollectionAPI > GetAll(const UsdPrim &prim)
Return a vector of all named instances of UsdCollectionAPI on the given prim.
UsdCollectionAPI(const UsdPrim &prim=UsdPrim(), const TfToken &name=TfToken())
Construct a UsdCollectionAPI on UsdPrim prim with name name .
static USD_API UsdCollectionAPI Apply(const UsdPrim &prim, const TfToken &name)
Applies this multiple-apply API schema to the given prim along with the given instance name,...
USD_API UsdAttribute CreateCollectionAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetCollectionAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
USD_API UsdAttribute GetCollectionAttr() const
This property represents the collection for the purpose of allowing another collection to include it.
USD_API bool Validate(std::string *reason) const
Validates the collection by checking the following rules:
This is a general purpose API schema, used to describe a collection of heterogeneous objects within t...
USD_API bool BlockCollection() const
Blocks the targets of the includes and excludes relationships of the collection, making it <* empty i...
static USD_API std::vector< UsdCollectionAPI > GetAllCollections(const UsdPrim &prim)
Returns all the named collections on the given USD prim.
static USD_API UsdCollectionAPI Get(const UsdStagePtr &stage, const SdfPath &path)
Return a UsdCollectionAPI holding the prim adhering to this schema at path on stage.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
std::vector< TfToken > TfTokenVector
Convenience types.
USD_API UsdAttribute CreateIncludeRootAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetIncludeRootAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
A path value used to locate objects in layers or scenegraphs.
static USD_API SdfPath GetNamedCollectionPath(const UsdPrim &prim, const TfToken &collectionName)
Returns the canonical path to the collection named, name on the given prim, prim.
static USD_API bool IsSchemaPropertyBaseName(const TfToken &baseName)
Checks if the given name baseName is the base name of a property of CollectionAPI.
A UsdRelationship creates dependencies between scenegraph objects by allowing a prim to target other ...
USD_API UsdAttribute CreateExpansionRuleAttr(VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
See GetExpansionRuleAttr(), and also Create vs Get Property Methods for when to use Get vs Create.
static USD_API bool CanApply(const UsdPrim &prim, const TfToken &name, std::string *whyNot=nullptr)
Returns true if this multiple-apply API schema can be applied, with the given instance name,...
TfToken GetName() const
Returns the name of this multiple-apply schema instance.
Contains an asset path and an optional resolved path.
static USD_API SdfPathSet ComputeIncludedPaths(const UsdCollectionMembershipQuery &query, const UsdStageWeakPtr &stage, const Usd_PrimFlagsPredicate &pred=UsdPrimDefaultPredicate)
Returns all the paths that satisfy the predicate, pred in the collection represented by the UsdCollec...
USD_API UsdRelationship CreateExcludesRel() const
See GetExcludesRel(), and also Create vs Get Property Methods for when to use Get vs Create.
Multiple Apply API Schema.
static USD_API std::set< UsdObject > ComputeIncludedObjects(const UsdCollectionMembershipQuery &query, const UsdStageWeakPtr &stage, const Usd_PrimFlagsPredicate &pred=UsdPrimDefaultPredicate)
Returns all the usd objects that satisfy the predicate, pred in the collection represented by the Usd...
UsdCollectionAPI(const UsdSchemaBase &schemaObj, const TfToken &name)
Construct a UsdCollectionAPI on the prim held by schemaObj with name name.
USD_API bool ResetCollection() const
Resets the collection by clearing both the includes and excludes targets of the collection in the cur...
TfType represents a dynamic runtime type.
USD_API bool IncludePath(const SdfPath &pathToInclude) const
Includes or adds the given path, pathToInclude in the collection.
Singleton registry that provides access to schema type information and the prim definitions for regis...
USD_API UsdRelationship GetIncludesRel() const
Specifies a list of targets that are included in the collection.
virtual USD_API ~UsdCollectionAPI()
Destructor.
USD_API SdfPath GetCollectionPath() const
Returns the canonical path that represents this collection.
USD_API UsdSchemaKind _GetSchemaKind() const override
Returns the kind of schema this class belongs to.
static const UsdSchemaKind schemaKind
Compile time constant representing what kind of schema this class is.
The base class for all schema types in Usd.
static USD_API bool IsCollectionAPIPath(const SdfPath &path, TfToken *name)
Checks if the given path path is of an API schema of type CollectionAPI.
const TfToken & _GetInstanceName() const
Returns the instance name of the API schema object belonging to a multiple-apply API schema.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
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...
static USD_API bool CanContainPropertyName(const TfToken &name)
Test whether a given name contains the "collection:" prefix.
USD_API UsdAttribute GetExpansionRuleAttr() const
Specifies how the paths that are included in the collection must be expanded to determine its members...