HDK
|
#include <prim.h>
Public Types | |
typedef UsdPrimSiblingIterator | SiblingIterator |
Convenience typedefs. More... | |
typedef UsdPrimSiblingRange | SiblingRange |
typedef UsdPrimSubtreeIterator | SubtreeIterator |
Convenience typedefs. More... | |
typedef UsdPrimSubtreeRange | SubtreeRange |
using | PropertyPredicateFunc = std::function< bool(const TfToken &propertyName)> |
Additional Inherited Members | |
![]() | |
static char | GetNamespaceDelimiter () |
![]() | |
template<class Derived > | |
UsdObject (_Null< Derived >) | |
UsdObject (const Usd_PrimDataHandle &prim, const SdfPath &proxyPrimPath) | |
UsdObject (UsdObjType objType, const Usd_PrimDataHandle &prim, const SdfPath &proxyPrimPath, const TfToken &propName) | |
UsdStage * | _GetStage () const |
USD_API SdfSpecType | _GetDefiningSpecType () const |
const Usd_PrimDataHandle & | _Prim () const |
const TfToken & | _PropName () const |
const SdfPath & | _ProxyPrimPath () const |
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as described in the Universal Scene Description Composition Compendium
A UsdPrim is the principal container of other types of scene description. It provides API for accessing and creating all of the contained kinds of scene description, which include:
As well as access to the API objects for properties contained within the prim - UsdPrim as well as all of the following classes are subclasses of UsdObject:
UsdPrim also provides access to iteration through its prim children, optionally making use of the prim predicates facility (GetChildren(), GetAllChildren(), GetFilteredChildren()).
Clients acquire UsdPrim objects, which act like weak/guarded pointers to persistent objects owned and managed by their originating UsdStage. We provide the following guarantees for a UsdPrim acquired via UsdStage::GetPrimAtPath() or UsdStage::OverridePrim() or UsdStage::DefinePrim():
Prim access in "reader" threads should be limited to GetPrimAtPath(), which will never cause a mutation to the Stage or its layers.
Please refer to UsdNotice for a listing of the events that could cause UsdNotice::ObjectsChanged to be emitted.
using UsdPrim::PropertyPredicateFunc = std::function<bool (const TfToken &propertyName)> |
Adds the applied API schema name token appliedSchemaName
to the apiSchemas metadata for this prim at the current edit target. For multiple-apply schemas the name token should include the instance name for the applied schema, for example 'CollectionAPI:plasticStuff'.
The name will only be added if the list operation at the edit target does not already have this applied schema in its explicit, prepended, or appended lists and is always added to the end of either the prepended or explicit items.
Returns true upon success or if the API schema is already applied in the current edit target.
An error is issued and false returned for any of the following conditions:
Unlike ApplyAPI this method does not require that the name token refer to a valid API schema type. ApplyAPI is the preferred method for applying valid API schemas.
|
inline |
Applies a single-apply API schema with the given C++ type 'SchemaType' to this prim in the current edit target.
This information is stored by adding the API schema's name token to the token-valued, listOp metadata apiSchemas on this prim.
Returns true upon success or if the API schema is already applied in the current edit target.
An error is issued and false returned for any of the following conditions:
Applies a multiple-apply API schema with the given C++ type 'SchemaType' and instance name instanceName
to this prim in the current edit target.
This information is stored in the token-valued, listOp metadata apiSchemas on this prim. For example, if SchemaType is 'UsdCollectionAPI' and instanceName
is 'plasticStuff', the name 'CollectionAPI:plasticStuff' is added to the 'apiSchemas' listOp metadata.
Returns true upon success or if the API schema is already applied with this instanceName
in the current edit target.
An error is issued and false returned for any of the following conditions:
instanceName
is empty USD_API bool UsdPrim::ApplyAPI | ( | const TfType & | schemaType, |
const TfToken & | instanceName = TfToken() |
||
) | const |
Applies an API schema with the given TfType schemaType
on this prim in the current edit target.
The schemaType
must be an applied API schema type. If the schemaType
is a multiple-apply schema, instanceName
must be non-empty while for single-apply schema, instanceName
must be empty. A error is issued and false returned if these conditions are not met.
This function behaves exactly like the templated ApplyAPI functions except for the runtime schemaType validation which happens at compile time for the templated functions. This method is provided for python clients. Use of the templated ApplyAPI is preferred.
|
inline |
|
inline |
USD_API bool UsdPrim::ClearPayload | ( | ) | const |
|
inline |
USD_API PcpPrimIndex UsdPrim::ComputeExpandedPrimIndex | ( | ) | const |
Compute the prim index containing all sites that could contribute opinions to this prim.
This function is similar to UsdPrim::GetPrimIndex. However, the returned prim index includes all sites that could possibly contribute opinions to this prim, not just the sites that currently do so. This is useful in certain situations; for example, this could be used to generate a list of sites where clients could make edits to affect this prim, or for debugging purposes.
This function may be relatively slow, since it will recompute the prim index on every call. Clients should prefer UsdPrim::GetPrimIndex unless the additional site information is truly needed.
USD_API UsdAttribute UsdPrim::CreateAttribute | ( | const TfToken & | name, |
const SdfValueTypeName & | typeName, | ||
bool | custom, | ||
SdfVariability | variability = SdfVariabilityVarying |
||
) | const |
Author scene description for the attribute named attrName at the current EditTarget if none already exists. Return a valid attribute if scene description was successfully authored or if it already existed, return invalid attribute otherwise. Note that the supplied typeName and custom arguments are only used in one specific case. See below for details.
Suggested use:
To call this, GetPrim() must return a valid prim.
USD_API UsdAttribute UsdPrim::CreateAttribute | ( | const TfToken & | name, |
const SdfValueTypeName & | typeName, | ||
SdfVariability | variability = SdfVariabilityVarying |
||
) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Create a custom attribute with name
, typeName
and variability
.
USD_API UsdAttribute UsdPrim::CreateAttribute | ( | const std::vector< std::string > & | nameElts, |
const SdfValueTypeName & | typeName, | ||
bool | custom, | ||
SdfVariability | variability = SdfVariabilityVarying |
||
) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This overload of CreateAttribute() accepts a vector of name components used to construct a namespaced property name. For details, see Usd_Ordering
USD_API UsdAttribute UsdPrim::CreateAttribute | ( | const std::vector< std::string > & | nameElts, |
const SdfValueTypeName & | typeName, | ||
SdfVariability | variability = SdfVariabilityVarying |
||
) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Create a custom attribute with nameElts
, typeName
, and variability
.
USD_API UsdRelationship UsdPrim::CreateRelationship | ( | const TfToken & | relName, |
bool | custom = true |
||
) | const |
Author scene description for the relationship named relName at the current EditTarget if none already exists. Return a valid relationship if scene description was successfully authored or if it already existed, return an invalid relationship otherwise.
Suggested use:
To call this, GetPrim() must return a valid prim.
custom
. USD_API UsdRelationship UsdPrim::CreateRelationship | ( | const std::vector< std::string > & | nameElts, |
bool | custom = true |
||
) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This overload of CreateRelationship() accepts a vector of name components used to construct a namespaced property name. For details, see Usd_Ordering
USD_API SdfPathVector UsdPrim::FindAllAttributeConnectionPaths | ( | std::function< bool(UsdAttribute const &)> const & | pred = nullptr , |
bool | recurseOnSources = false |
||
) | const |
Search the prim subtree rooted at this prim for attributes for which predicate
returns true, collect their connection source paths and return them in an arbitrary order. If recurseOnSources
is true, act as if this function was invoked on the connected prims and owning prims of connected properties also and return the union.
USD_API SdfPathVector UsdPrim::FindAllRelationshipTargetPaths | ( | std::function< bool(UsdRelationship const &)> const & | pred = nullptr , |
bool | recurseOnTargets = false |
||
) | const |
Search the prim subtree rooted at this prim for relationships for which predicate
returns true, collect their target paths and return them in an arbitrary order. If recurseOnTargets
is true, act as if this function was invoked on the targeted prims and owning prims of targeted properties also (but not of forwarding relationships) and return the union.
|
inline |
|
inline |
Return all this prim's descendants as an iterable range.
See Prim predicate flags and UsdPrimDefaultPredicate for more information, UsdStage::Traverse(), and UsdPrimRange
for more general Stage traversal behaviors.
USD_API TfTokenVector UsdPrim::GetAppliedSchemas | ( | ) | const |
Return a vector containing the names of API schemas which have been applied to this prim. This includes both the authored API schemas applied using the Apply() method on the particular schema class as well as any built-in API schemas that are automatically included through the prim type's prim definition. To get only the authored API schemas use GetPrimTypeInfo instead.
USD_API UsdAttribute UsdPrim::GetAttribute | ( | const TfToken & | attrName | ) | const |
Return a UsdAttribute with the name attrName. The attribute returned may or may not actually exist so it must be checked for validity. Suggested use:
USD_API UsdAttribute UsdPrim::GetAttributeAtPath | ( | const SdfPath & | path | ) | const |
Returns the attribute at path
on the same stage as this prim. If path is relative, it will be anchored to the path of this prim.
USD_API std::vector<UsdAttribute> UsdPrim::GetAttributes | ( | ) | const |
Like GetProperties(), but exclude all relationships from the result.
USD_API std::vector<UsdAttribute> UsdPrim::GetAuthoredAttributes | ( | ) | const |
Like GetAttributes(), but exclude attributes without authored scene description from the result. See UsdProperty::IsAuthored().
USD_API std::vector<UsdProperty> UsdPrim::GetAuthoredProperties | ( | const PropertyPredicateFunc & | predicate = {} | ) | const |
Return this prim's properties (attributes and relationships) that have authored scene description, ordered by name according to the strongest propertyOrder statement in scene description if one exists, otherwise ordered according to TfDictionaryLessThan.
If a valid predicate
is passed in, then only authored properties whose names pass the predicate are included in the result. This is useful if the client is interested only in a subset of authored properties on the prim. For example, only the ones in a given namespace or only the ones needed to compute a value.
USD_API std::vector<UsdProperty> UsdPrim::GetAuthoredPropertiesInNamespace | ( | const std::vector< std::string > & | namespaces | ) | const |
Like GetPropertiesInNamespace(), but exclude properties that do not have authored scene description from the result. See UsdProperty::IsAuthored().
For details of namespaced properties, see Usd_Ordering
USD_API std::vector<UsdProperty> UsdPrim::GetAuthoredPropertiesInNamespace | ( | const std::string & | namespaces | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. namespaces
must be an already-concatenated ordered set of namespaces, and may or may not terminate with the namespace-separator character. If namespaces
is empty, this method is equivalent to GetAuthoredProperties().
USD_API TfTokenVector UsdPrim::GetAuthoredPropertyNames | ( | const PropertyPredicateFunc & | predicate = {} | ) | const |
Return this prim's property names (attributes and relationships) that have authored scene description, ordered according to the strongest propertyOrder statement in scene description if one exists, otherwise ordered according to TfDictionaryLessThan.
If a valid predicate
is passed in, then only the authored properties whose names pass the predicate are included in the result. This is useful if the client is interested only in a subset of authored properties on the prim. For example, only the ones in a given namespace or only the ones needed to compute a value.
USD_API std::vector<UsdRelationship> UsdPrim::GetAuthoredRelationships | ( | ) | const |
Like GetRelationships(), but exclude relationships without authored scene description from the result. See UsdProperty::IsAuthored().
Return this prim's direct child named name
if it has one, otherwise return an invalid UsdPrim. Equivalent to:
|
inline |
Return this prim's active, loaded, defined, non-abstract children as an iterable range. Equivalent to:
See Prim predicate flags and UsdPrimDefaultPredicate for more information.
|
inline |
Return this prim's active, loaded, defined, non-abstract descendants as an iterable range. Equivalent to:
See Prim predicate flags and UsdPrimDefaultPredicate for more information, UsdStage::Traverse(), and UsdPrimRange
for more general Stage traversal behaviors.
|
inline |
Return a subset of all of this prim's children filtered by predicate
as an iterable range. The predicate
is generated by combining a series of prim flag terms with either && or || and !.
Example usage:
If this prim is an instance, no children will be returned unless UsdTraverseInstanceProxies is used to allow instance proxies to be returned, or if this prim is itself an instance proxy.
See Prim predicate flags and UsdPrimDefaultPredicate for more information.
|
inline |
Return a subset of all of this prim's descendants filtered by predicate
as an iterable range. The predicate
is generated by combining a series of prim flag terms with either && or || and !.
Example usage:
If this prim is an instance, no descendants will be returned unless UsdTraverseInstanceProxies is used to allow instance proxies to be returned, or if this prim is itself an instance proxy.
See Prim predicate flags and UsdPrimDefaultPredicate for more information, UsdStage::Traverse(), and UsdPrimRange
for more general Stage traversal behaviors.
USD_API UsdPrim UsdPrim::GetFilteredNextSibling | ( | const Usd_PrimFlagsPredicate & | predicate | ) | const |
Return this prim's next sibling that matches predicate
if it has one, otherwise return the invalid UsdPrim.
See Prim predicate flags and UsdPrimDefaultPredicate for more information.
USD_API UsdInherits UsdPrim::GetInherits | ( | ) | const |
Return a UsdInherits object that allows one to add, remove, or mutate inherits at the currently set UsdEditTarget.
There is currently no facility for listing the currently authored inherits on a prim... the problem is somewhat ill-defined, and requires some thought.
If this prim is a master prim, returns all prims that are instances of this master. Otherwise, returns an empty vector.
Note that this function will return prims in masters for instances that are nested beneath other instances.
Return this prim's next active, loaded, defined, non-abstract sibling if it has one, otherwise return an invalid UsdPrim. Equivalent to:
See Prim predicate flags and UsdPrimDefaultPredicate for more information.
Returns the object at path
on the same stage as this prim. If path is is relative, it will be anchored to the path of this prim.
|
inline |
USD_API UsdPayloads UsdPrim::GetPayloads | ( | ) | const |
Return a UsdPayloads object that allows one to add, remove, or mutate payloads at the currently set UsdEditTarget.
There is currently no facility for listing the currently authored payloads on a prim... the problem is somewhat ill-defined, and requires some thought.
Returns the prim at path
on the same stage as this prim. If path is is relative, it will be anchored to the path of this prim.
|
inline |
|
inline |
Return the cached prim index containing all sites that can contribute opinions to this prim.
The prim index can be used to examine the composition arcs and scene description sites that can contribute to this prim's property and metadata values.
The prim index returned by this function is optimized and may not include sites that do not contribute opinions to this prim. Use UsdPrim::ComputeExpandedPrimIndex to compute a prim index that includes all possible sites that could contribute opinions.
This prim index will be empty for master prims. This ensures that these prims do not provide any attribute or metadata values. For all other prims in masters, this is the prim index that was chosen to be shared with all other instances. In either case, the prim index's path will not be the same as the prim's path.
Prim indexes may be invalidated by changes to the UsdStage and cannot detect if they are expired. Clients should avoid keeping copies of the prim index across such changes, which include scene description changes or changes to load state.
|
inline |
USD_API SdfPrimSpecHandleVector UsdPrim::GetPrimStack | ( | ) | const |
Return all the authored SdfPrimSpecs that may contain opinions for this prim in order from strong to weak.
This does not include all the places where contributing prim specs could potentially be created; rather, it includes only those prim specs that already exist. To discover all the places that prim specs could be authored that would contribute opinions, see "Composition Structure"
|
inline |
Return the prim's full type info composed from its type name, applied API schemas, and any fallback types defined on the stage for unrecognized prim type names. The returned type structure contains the "true" schema type used to create this prim's prim definition and answer the IsA query. This value is cached and efficient to query.
USD_API std::vector<UsdProperty> UsdPrim::GetProperties | ( | const PropertyPredicateFunc & | predicate = {} | ) | const |
Return all of this prim's properties (attributes and relationships), including all builtin properties, ordered by name according to the strongest propertyOrder statement in scene description if one exists, otherwise ordered according to TfDictionaryLessThan.
If a valid predicate
is passed in, then only properties whose names pass the predicate are included in the result. This is useful if the client is interested only in a subset of properties on the prim. For example, only the ones in a given namespace or only the ones needed to compute a value.
To obtain only either attributes or relationships, use either GetAttributes() or GetRelationships().
To determine whether a property is either an attribute or a relationship, use the UsdObject::As() and UsdObject::Is() methods in C++:
In Python, use the standard isinstance() function:
USD_API std::vector<UsdProperty> UsdPrim::GetPropertiesInNamespace | ( | const std::vector< std::string > & | namespaces | ) | const |
Return this prim's properties that are inside the given property namespace ordered according to the strongest propertyOrder statement in scene description if one exists, otherwise ordered according to TfDictionaryLessThan.
A namespaces
argument whose elements are ["ri", "attribute"] will return all the properties under the namespace "ri:attribute", i.e. "ri:attribute:*". An empty namespaces
argument is equivalent to GetProperties().
For details of namespaced properties, see Usd_Ordering
USD_API std::vector<UsdProperty> UsdPrim::GetPropertiesInNamespace | ( | const std::string & | namespaces | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. namespaces
must be an already-concatenated ordered set of namespaces, and may or may not terminate with the namespace-separator character. If namespaces
is empty, this method is equivalent to GetProperties().
USD_API UsdProperty UsdPrim::GetProperty | ( | const TfToken & | propName | ) | const |
Return a UsdProperty with the name propName. The property returned may or may not actually exist so it must be checked for validity. Suggested use:
USD_API UsdProperty UsdPrim::GetPropertyAtPath | ( | const SdfPath & | path | ) | const |
Returns the property at path
on the same stage as this prim. If path is relative, it will be anchored to the path of this prim.
USD_API TfTokenVector UsdPrim::GetPropertyNames | ( | const PropertyPredicateFunc & | predicate = {} | ) | const |
Return all of this prim's property names (attributes and relationships), including all builtin properties.
If a valid predicate
is passed in, then only properties whose names pass the predicate are included in the result. This is useful if the client is interested only in a subset of properties on the prim. For example, only the ones in a given namespace or only the ones needed to compute a value.
USD_API TfTokenVector UsdPrim::GetPropertyOrder | ( | ) | const |
Return the strongest propertyOrder metadata value authored on this prim.
USD_API UsdReferences UsdPrim::GetReferences | ( | ) | const |
Return a UsdReferences object that allows one to add, remove, or mutate references at the currently set UsdEditTarget.
There is currently no facility for listing the currently authored references on a prim... the problem is somewhat ill-defined, and requires some thought.
USD_API UsdRelationship UsdPrim::GetRelationship | ( | const TfToken & | relName | ) | const |
Return a UsdRelationship with the name relName. The relationship returned may or may not actually exist so it must be checked for validity. Suggested use:
USD_API UsdRelationship UsdPrim::GetRelationshipAtPath | ( | const SdfPath & | path | ) | const |
Returns the relationship at path
on the same stage as this prim. If path is relative, it will be anchored to the path of this prim.
USD_API std::vector<UsdRelationship> UsdPrim::GetRelationships | ( | ) | const |
Like GetProperties(), but exclude all attributes from the result.
USD_API UsdSpecializes UsdPrim::GetSpecializes | ( | ) | const |
Return a UsdSpecializes object that allows one to add, remove, or mutate specializes at the currently set UsdEditTarget.
There is currently no facility for listing the currently authored specializes on a prim... the problem is somewhat ill-defined, and requires some thought.
|
inline |
Return this prim's composed type name. This value is cached and is efficient to query. Note that this is just the composed type name as authored and may not represent the full type of the prim and its prim definition. If you need to reason about the actual type of the prim, use GetPrimTypeInfo instead as it accounts for recognized schemas, applied API schemas, fallback types, etc.
USD_API UsdVariantSet UsdPrim::GetVariantSet | ( | const std::string & | variantSetName | ) | const |
Retrieve a specifically named VariantSet for editing or constructing a UsdEditTarget.
This is a shortcut for
USD_API UsdVariantSets UsdPrim::GetVariantSets | ( | ) | const |
Return a UsdVariantSets object representing all the VariantSets present on this prim.
The returned object also provides the API for adding new VariantSets to the prim.
Return true if the UsdPrim has had an API schema represented by the C++ class type T applied to it through the Apply() method provided on the API schema class.
instanceName
, if non-empty is used to determine if a particular instance of a multiple-apply API schema (eg. UsdCollectionAPI) has been applied to the prim. A coding error is issued if a non-empty instanceName
is passed in and T represents a single-apply API schema.
Using HasAPI in C++
The python version of this method takes as an argument the TfType of the API schema class. Similar validation of the schema type is performed in python at run-time and a coding error is issued if the given type is not a valid applied API schema.
Using HasAPI in Python
USD_API bool UsdPrim::HasAPI | ( | const TfType & | schemaType, |
const TfToken & | instanceName = TfToken() |
||
) | const |
Return true if a prim has an API schema with TfType schemaType
.
instanceName
, if non-empty is used to determine if a particular instance of a multiple-apply API schema (eg. UsdCollectionAPI) has been applied to the prim. A coding error is issued if a non-empty instanceName
is passed in and T represents a single-apply API schema.
Return true if this prim has an attribute named attrName
, false otherwise.
|
inline |
USD_API bool UsdPrim::HasAuthoredInherits | ( | ) | const |
Return true if this prim has any authored inherits.
|
inline |
USD_API bool UsdPrim::HasAuthoredPayloads | ( | ) | const |
Return true if this prim has any authored payloads.
USD_API bool UsdPrim::HasAuthoredReferences | ( | ) | const |
Return true if this prim has any authored references.
USD_API bool UsdPrim::HasAuthoredSpecializes | ( | ) | const |
Returns true if this prim has any authored specializes.
|
inline |
|
inline |
Return true if this prim has a specifier of type SdfSpecifierDef or SdfSpecifierClass.
USD_API bool UsdPrim::HasPayload | ( | ) | const |
Return true if this prim has an property named propName
, false otherwise.
Return true if this prim has a relationship named relName
, false otherwise.
USD_API bool UsdPrim::HasVariantSets | ( | ) | const |
Return true if this prim has any authored VariantSets.
|
inline |
Return true if the prim's schema type, is or inherits schema type T.
Return true if the prim's schema type is or inherits schemaType
.
|
inline |
|
inline |
|
inline |
Return true if this prim and all its ancestors have defining specifiers, false otherwise.
|
inline |
|
inline |
|
inline |
Return true if this prim is an instance of a master, false otherwise.
If this prim is an instance, calling GetMaster() will return the UsdPrim for the corresponding master prim.
|
inline |
Return true if this prim has been marked as instanceable.
Note that this is not the same as IsInstance(). A prim may return true for IsInstanceable() and false for IsInstance() if this prim is not active or if it is marked as instanceable but contains no instanceable data.
|
inline |
|
inline |
|
inline |
|
inline |
USD_API bool UsdPrim::IsPseudoRoot | ( | ) | const |
Returns true if the prim is the pseudo root.
Equivalent to
USD_API void UsdPrim::Load | ( | UsdLoadPolicy | policy = UsdLoadWithDescendants | ) | const |
Load this prim, all its ancestors, and by default all its descendants. If loadPolicy
is UsdLoadWithoutDescendants, then load only this prim and its ancestors.
See UsdStage::Load for additional details.
|
inline |
Removes a single-apply API schema with the given C++ type 'SchemaType' from this prim in the current edit target.
This is done by removing the API schema's name token from the token-valued, listOp metadata apiSchemas on this prim as well as authoring an explicit deletion of schema name from the listOp.
Returns true upon success or if the API schema is already deleted in the current edit target.
An error is issued and false returned for any of the following conditions:
Removes a multiple-apply API schema with the given C++ type 'SchemaType' and instance name instanceName
from this prim in the current edit target.
This is done by removing the instanced schema name token from the token-valued, listOp metadata apiSchemas on this prim as well as authoring an explicit deletion of the name from the listOp. For example, if SchemaType is 'UsdCollectionAPI' and instanceName
is 'plasticStuff', the name 'CollectionAPI:plasticStuff' is deleted from the 'apiSchemas' listOp metadata.
Returns true upon success or if the API schema with this instanceName
is already deleted in the current edit target.
An error is issued and false returned for any of the following conditions:
instanceName
is empty USD_API bool UsdPrim::RemoveAPI | ( | const TfType & | schemaType, |
const TfToken & | instanceName = TfToken() |
||
) | const |
Removes an API schema with the given TfType schemaType
from this prim in the current edit target.
The schemaType
must be an applied API schema type. If the schemaType
is a multiple-apply schema, instanceName
must be non-empty while for single-apply schema, instanceName
must be empty. A error is issued and false returned if these conditions are not met.
This function behaves exactly like the templated RemoveAPI functions except for the runtime schemaType validation which happens at compile time for the templated functions. This method is provided for python clients. Use of the templated RemoveAPI is preferred.
Removes the applied API schema name token appliedSchemaName
from the apiSchemas metadata for this prim at the current edit target. For multiple-apply schemas the name token should include the instance name for the applied schema, for example 'CollectionAPI:plasticStuff'
For an explicit list operation, this removes the applied schema name from the explicit items list if it was present. For a non-explicit list operation, this will remove any occurrence of the applied schema name from the prepended and appended item as well as adding it to the deleted items list.
Returns true upon success or if the API schema is already deleted in the current edit target.
An error is issued and false returned for any of the following conditions:
Unlike RemoveAPI this method does not require that the name token refer to a valid API schema type. RemoveAPI is the preferred method for removing valid API schemas.
Remove all scene description for the property with the given propName
in the current UsdEditTarget. Return true if the property is removed, false otherwise.
Because this method can only remove opinions about the property from the current EditTarget, you may generally find it more useful to use UsdAttribute::Block(), which will ensure that all values from the EditTarget and weaker layers for the property will be ignored.
|
inline |
|
inline |
USD_API bool UsdPrim::SetPayload | ( | const SdfPayload & | payload | ) | const |
USD_API bool UsdPrim::SetPayload | ( | const std::string & | assetPath, |
const SdfPath & | primPath | ||
) | const |
USD_API void UsdPrim::SetPropertyOrder | ( | const TfTokenVector & | order | ) | const |
Author an opinion for propertyOrder metadata on this prim at the current EditTarget.
|
inline |
Unloads this prim and all its descendants.
See UsdStage::Unload for additional details.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |