24 #ifndef USDSHADE_GENERATED_MATERIALBINDINGAPI_H
25 #define USDSHADE_GENERATED_MATERIALBINDINGAPI_H
39 #include <tbb/concurrent_unordered_map.h>
251 static const TfType &_GetStaticTfType();
253 static bool _IsTypedSchema();
257 const TfType &_GetTfType()
const override;
330 return _materialPath;
341 return _materialPurpose;
406 return _collectionPath;
411 return _materialPath;
498 const TfToken &bindingStrength);
622 const TfToken &materialPurpose)
const;
639 const TfToken &materialPurpose)
const;
695 tbb::concurrent_unordered_map<
SdfPath,
713 bool supportLegacyBindings);
810 bool supportLegacyBindings=
true)
const;
840 bool supportLegacyBindings=
true)
const;
866 const std::vector<UsdPrim> &prims,
868 std::vector<UsdRelationship> *bindingRels=
nullptr,
869 bool supportLegacyBindings=
true);
988 const TfToken &materialPurpose)
const;
992 const TfToken &materialPurpose)
const;
USDSHADE_API UsdSchemaKind _GetSchemaKind() const override
static USDSHADE_API UsdShadeMaterialBindingAPI Get(const UsdStagePtr &stage, const SdfPath &path)
static USDSHADE_API bool SetMaterialBindingStrength(const UsdRelationship &bindingRel, const TfToken &bindingStrength)
const SdfPath & GetMaterialPath() const
Returns the path to the material that is bound to by this binding.
GLsizei GLenum const void * indices
USDSHADE_API std::vector< UsdGeomSubset > GetMaterialBindSubsets()
USDSHADE_API TfStaticData< UsdShadeTokensType > UsdShadeTokens
const TfToken & GetMaterialPurpose() const
Returns the purpose of the direct binding.
CollectionBindingVector allPurposeCollBindings
The ordered list of all-purpose collection bindings on the prim.
GLsizei const GLchar *const * string
USDSHADE_API UsdShadeMaterial GetMaterial() const
Gets the material object that this direct binding binds to.
static USDSHADE_API const SdfPath GetResolvedTargetPathFromBindingRel(const UsdRelationship &bindingRel)
returns the path of the resolved target identified by bindingRel.
GLsizei const GLchar *const * path
USDSHADE_API bool SetMaterialBindSubsetsFamilyType(const TfToken &familyType)
static USDSHADE_API bool CanContainPropertyName(const TfToken &name)
USDSHADE_API bool UnbindAllBindings() const
Unbinds all direct and collection-based bindings on this prim.
bool IsEmpty() const noexcept
Returns true if this is the empty path (SdfPath::EmptyPath()).
static USDSHADE_API bool CanApply(const UsdPrim &prim, std::string *whyNot=nullptr)
USDSHADE_API DirectBinding GetDirectBinding(const TfToken &materialPurpose=UsdShadeTokens->allPurpose) const
const SdfPath & GetCollectionPath() const
Returns the path to the collection that is bound by this binding.
static USDSHADE_API TfTokenVector GetMaterialPurposes()
Returns a vector of the possible values for the 'material purpose'.
USDSHADE_API bool Bind(const UsdShadeMaterial &material, const TfToken &bindingStrength=UsdShadeTokens->fallbackStrength, const TfToken &materialPurpose=UsdShadeTokens->allPurpose) const
USDSHADE_API UsdRelationship GetDirectBindingRel(const TfToken &materialPurpose=UsdShadeTokens->allPurpose) const
static USDSHADE_API std::vector< UsdShadeMaterial > ComputeBoundMaterials(const std::vector< UsdPrim > &prims, const TfToken &materialPurpose=UsdShadeTokens->allPurpose, std::vector< UsdRelationship > *bindingRels=nullptr, bool supportLegacyBindings=true)
tbb::concurrent_unordered_map< SdfPath, std::unique_ptr< UsdCollectionAPI::MembershipQuery >, SdfPath::Hash > CollectionQueryCache
static const UsdSchemaKind schemaKind
USDSHADE_API bool AddPrimToBindingCollection(const UsdPrim &prim, const TfToken &bindingName, const TfToken &materialPurpose) const
USDSHADE_API bool UnbindDirectBinding(const TfToken &materialPurpose=UsdShadeTokens->allPurpose) const
USDSHADE_API UsdGeomSubset CreateMaterialBindSubset(const TfToken &subsetName, const VtIntArray &indices, const TfToken &elementType=UsdGeomTokens->face)
static USDSHADE_API UsdShadeMaterialBindingAPI Apply(const UsdPrim &prim)
USDSHADE_API bool UnbindCollectionBinding(const TfToken &bindingName, const TfToken &materialPurpose=UsdShadeTokens->allPurpose) const
std::vector< TfToken > TfTokenVector
Convenience types.
GLuint const GLchar * name
USDSHADE_API UsdShadeMaterial ComputeBoundMaterial(BindingsCache *bindingsCache, CollectionQueryCache *collectionQueryCache, const TfToken &materialPurpose=UsdShadeTokens->allPurpose, UsdRelationship *bindingRel=nullptr, bool supportLegacyBindings=true) const
USDSHADE_API UsdCollectionAPI GetCollection() const
USDSHADE_API UsdShadeMaterial GetMaterial() const
static USDSHADE_API bool IsCollectionBindingRel(const UsdRelationship &bindingRel)
Checks if the bindingRel identifies a collection.
UsdShadeMaterialBindingAPI(const UsdPrim &prim=UsdPrim())
USDSHADE_API bool RemovePrimFromBindingCollection(const UsdPrim &prim, const TfToken &bindingName, const TfToken &materialPurpose) const
const UsdRelationship & GetBindingRel() const
USDSHADE_API BindingsAtPrim(const UsdPrim &prim, const TfToken &materialPurpose, bool supportLegacyBindings)
USDSHADE_API UsdRelationship GetCollectionBindingRel(const TfToken &bindingName, const TfToken &materialPurpose=UsdShadeTokens->allPurpose) const
DirectBindingPtr directBinding
USDGEOM_API TfStaticData< UsdGeomTokensType > UsdGeomTokens
std::unique_ptr< DirectBinding > DirectBindingPtr
Alias for a unique_ptr to a DirectBinding object.
static USDSHADE_API TfToken GetMaterialBindingStrength(const UsdRelationship &bindingRel)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
UsdShadeMaterialBindingAPI(const UsdSchemaBase &schemaObj)
CollectionBindingVector restrictedPurposeCollBindings
const SdfPath & GetMaterialPath() const
#define PXR_NAMESPACE_CLOSE_SCOPE
static USDSHADE_API const TfTokenVector & GetSchemaAttributeNames(bool includeInherited=true)
tbb::concurrent_unordered_map< SdfPath, std::unique_ptr< BindingsAtPrim >, SdfPath::Hash > BindingsCache
USDSHADE_API TfToken GetMaterialBindSubsetsFamilyType()
USDSHADE_API CollectionBindingVector GetCollectionBindings(const TfToken &materialPurpose=UsdShadeTokens->allPurpose) const
virtual USDSHADE_API ~UsdShadeMaterialBindingAPI()
Destructor.
USDSHADE_API std::vector< UsdRelationship > GetCollectionBindingRels(const TfToken &materialPurpose=UsdShadeTokens->allPurpose) const
const UsdRelationship & GetBindingRel() const
std::vector< CollectionBinding > CollectionBindingVector