7#ifndef PXR_USD_USD_PRIM_H
8#define PXR_USD_USD_PRIM_H
13#include "pxr/usd/usd/api.h"
17#include "pxr/usd/usd/schemaRegistry.h"
19#include "pxr/usd/sdf/schema.h"
27#include "pxr/usd/sdf/path.h"
34PXR_NAMESPACE_OPEN_SCOPE
141 return _Prim()->GetPrimTypeInfo();
148 return _Prim()->GetPrimDefinition();
183 std::vector<std::pair<SdfPrimSpecHandle, SdfLayerOffset>>
189 return SetMetadata(SdfFieldKeys->Specifier, specifier);
203 return SetMetadata(SdfFieldKeys->TypeName, typeName);
221 bool IsActive()
const {
return _Prim()->IsActive(); }
251 bool IsLoaded()
const {
return _Prim()->IsLoaded(); }
255 bool IsModel()
const {
return _Prim()->IsModel(); }
263 bool IsGroup()
const {
return _Prim()->IsGroup(); }
288 return _Prim()->HasClassSpecifier();
294 return _Prim()->HasDefiningSpecifier();
312 std::function<bool (
const TfToken &propertyName)>;
422 std::vector<UsdProperty>
430 std::vector<UsdProperty>
439 std::vector<UsdProperty>
441 const std::vector<std::string> &namespaces)
const;
449 std::vector<UsdProperty>
548 bool _HasAPIInstance(
550 const TfToken &instanceName)
const;
553 bool _CanApplySingleApplyAPI(
555 std::string *whyNot)
const;
558 bool _CanApplyMultipleApplyAPI(
561 std::string *whyNot)
const;
564 bool _ApplySingleApplyAPI(
568 bool _ApplyMultipleApplyAPI(
570 const TfToken &instanceName)
const;
573 bool _RemoveSingleApplyAPI(
577 bool _RemoveMultipleApplyAPI(
579 const TfToken &instanceName)
const;
592 template <
typename SchemaType>
594 static_assert(std::is_base_of<UsdSchemaBase, SchemaType>::value,
595 "Provided type must derive UsdSchemaBase.");
596 return _IsA(UsdSchemaRegistry::FindSchemaInfo<SchemaType>());
612 UsdSchemaVersion schemaVersion)
const;
631 UsdSchemaVersion schemaVersion,
638 template <
typename SchemaType>
641 static_assert(std::is_base_of<UsdSchemaBase, SchemaType>::value,
642 "Provided type must derive UsdSchemaBase.");
644 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
647 "UsdSchemaRegistry as a schema type. The schema may need to be "
675 const TfToken &schemaIdentifier,
685 UsdSchemaVersion *schemaVersion)
const;
741 template <
typename SchemaType>
744 static_assert(std::is_base_of<UsdAPISchemaBase, SchemaType>::value,
745 "Provided type must derive UsdAPISchemaBase.");
746 static_assert(!std::is_same<UsdAPISchemaBase, SchemaType>::value,
747 "Provided type must not be UsdAPISchemaBase.");
749 SchemaType::schemaKind == UsdSchemaKind::SingleApplyAPI ||
750 SchemaType::schemaKind == UsdSchemaKind::MultipleApplyAPI,
751 "Provided schema type must be an applied API schema.");
753 return _HasAPI(UsdSchemaRegistry::FindSchemaInfo<SchemaType>());
761 template <
typename SchemaType>
764 static_assert(std::is_base_of<UsdAPISchemaBase, SchemaType>::value,
765 "Provided type must derive UsdAPISchemaBase.");
766 static_assert(!std::is_same<UsdAPISchemaBase, SchemaType>::value,
767 "Provided type must not be UsdAPISchemaBase.");
768 static_assert(SchemaType::schemaKind == UsdSchemaKind::MultipleApplyAPI,
769 "Provided schema type must be a multi apply API schema.");
771 return _HasAPIInstance(
772 UsdSchemaRegistry::FindSchemaInfo<SchemaType>(), instanceName);
783 const TfToken& instanceName)
const;
795 const TfToken& instanceName)
const;
801 UsdSchemaVersion schemaVersion)
const;
808 UsdSchemaVersion schemaVersion,
809 const TfToken& instanceName)
const;
825 const TfToken &schemaFamily)
const;
835 const TfToken &instanceName)
const;
848 UsdSchemaVersion schemaVersion,
860 UsdSchemaVersion schemaVersion,
862 const TfToken &instanceName)
const;
868 template <
typename SchemaType>
871 static_assert(std::is_base_of<UsdSchemaBase, SchemaType>::value,
872 "Provided type must derive UsdSchemaBase.");
874 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
877 "UsdSchemaRegistry as a schema type. The schema may need to be "
890 template <
typename SchemaType>
893 const TfToken &instanceName)
const {
894 static_assert(std::is_base_of<UsdSchemaBase, SchemaType>::value,
895 "Provided type must derive UsdSchemaBase.");
897 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
900 "UsdSchemaRegistry as a schema type. The schema may need to be "
906 versionPolicy, instanceName);
926 const TfToken &instanceName)
const;
938 const TfToken &schemaIdentifier,
951 const TfToken &schemaIdentifier,
953 const TfToken &instanceName)
const;
972 UsdSchemaVersion *schemaVersion)
const;
991 UsdSchemaVersion *schemaVersion)
const;
1011 template <
typename SchemaType>
1013 static_assert(std::is_base_of<UsdAPISchemaBase, SchemaType>::value,
1014 "Provided type must derive UsdAPISchemaBase.");
1015 static_assert(!std::is_same<UsdAPISchemaBase, SchemaType>::value,
1016 "Provided type must not be UsdAPISchemaBase.");
1017 static_assert(SchemaType::schemaKind == UsdSchemaKind::SingleApplyAPI,
1018 "Provided schema type must be a single apply API schema.");
1021 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1024 "UsdSchemaRegistry as a schema type. The schema may need to be "
1026 TfType::Find<SchemaType>().
GetTypeName().c_str());
1029 return _CanApplySingleApplyAPI(*schemaInfo, whyNot);
1045 template <
typename SchemaType>
1047 std::string *whyNot =
nullptr)
const {
1048 static_assert(std::is_base_of<UsdAPISchemaBase, SchemaType>::value,
1049 "Provided type must derive UsdAPISchemaBase.");
1050 static_assert(!std::is_same<UsdAPISchemaBase, SchemaType>::value,
1051 "Provided type must not be UsdAPISchemaBase.");
1052 static_assert(SchemaType::schemaKind == UsdSchemaKind::MultipleApplyAPI,
1053 "Provided schema type must be a multiple apply API schema.");
1056 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1059 "UsdSchemaRegistry as a schema type. The schema may need to be "
1061 TfType::Find<SchemaType>().
GetTypeName().c_str());
1064 return _CanApplyMultipleApplyAPI(*schemaInfo, instanceName, whyNot);
1071 std::string *whyNot =
nullptr)
const;
1079 std::string *whyNot =
nullptr)
const;
1085 std::string *whyNot =
nullptr)
const;
1094 std::string *whyNot =
nullptr)
const;
1100 UsdSchemaVersion schemaVersion,
1101 std::string *whyNot =
nullptr)
const;
1109 UsdSchemaVersion schemaVersion,
1111 std::string *whyNot =
nullptr)
const;
1134 template <
typename SchemaType>
1136 static_assert(std::is_base_of<UsdAPISchemaBase, SchemaType>::value,
1137 "Provided type must derive UsdAPISchemaBase.");
1138 static_assert(!std::is_same<UsdAPISchemaBase, SchemaType>::value,
1139 "Provided type must not be UsdAPISchemaBase.");
1140 static_assert(SchemaType::schemaKind == UsdSchemaKind::SingleApplyAPI,
1141 "Provided schema type must be a single apply API schema.");
1144 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1147 "UsdSchemaRegistry as a schema type. The schema may need to be "
1149 TfType::Find<SchemaType>().
GetTypeName().c_str());
1152 return _ApplySingleApplyAPI(*schemaInfo);
1175 template <
typename SchemaType>
1177 static_assert(std::is_base_of<UsdAPISchemaBase, SchemaType>::value,
1178 "Provided type must derive UsdAPISchemaBase.");
1179 static_assert(!std::is_same<UsdAPISchemaBase, SchemaType>::value,
1180 "Provided type must not be UsdAPISchemaBase.");
1181 static_assert(SchemaType::schemaKind == UsdSchemaKind::MultipleApplyAPI,
1182 "Provided schema type must be a multiple apply API schema.");
1185 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1188 "UsdSchemaRegistry as a schema type. The schema may need to be "
1190 TfType::Find<SchemaType>().
GetTypeName().c_str());
1193 return _ApplyMultipleApplyAPI(*schemaInfo, instanceName);
1204 const TfToken& instanceName)
const;
1216 const TfToken& instanceName)
const;
1222 UsdSchemaVersion schemaVersion)
const;
1229 UsdSchemaVersion schemaVersion,
1230 const TfToken& instanceName)
const;
1254 template <
typename SchemaType>
1256 static_assert(std::is_base_of<UsdAPISchemaBase, SchemaType>::value,
1257 "Provided type must derive UsdAPISchemaBase.");
1258 static_assert(!std::is_same<UsdAPISchemaBase, SchemaType>::value,
1259 "Provided type must not be UsdAPISchemaBase.");
1260 static_assert(SchemaType::schemaKind == UsdSchemaKind::SingleApplyAPI,
1261 "Provided schema type must be a single apply API schema.");
1264 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1267 "UsdSchemaRegistry as a schema type. The schema may need to be "
1269 TfType::Find<SchemaType>().
GetTypeName().c_str());
1272 return _RemoveSingleApplyAPI(*schemaInfo);
1296 template <
typename SchemaType>
1298 static_assert(std::is_base_of<UsdAPISchemaBase, SchemaType>::value,
1299 "Provided type must derive UsdAPISchemaBase.");
1300 static_assert(!std::is_same<UsdAPISchemaBase, SchemaType>::value,
1301 "Provided type must not be UsdAPISchemaBase.");
1302 static_assert(SchemaType::schemaKind == UsdSchemaKind::MultipleApplyAPI,
1303 "Provided schema type must be a multiple apply API schema.");
1306 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1309 "UsdSchemaRegistry as a schema type. The schema may need to be "
1311 TfType::Find<SchemaType>().
GetTypeName().c_str());
1314 return _RemoveMultipleApplyAPI(*schemaInfo, instanceName);
1325 const TfToken& instanceName)
const;
1337 const TfToken& instanceName)
const;
1343 UsdSchemaVersion schemaVersion)
const;
1350 UsdSchemaVersion schemaVersion,
1351 const TfToken& instanceName)
const;
1469 const Usd_PrimFlagsPredicate &predicate)
const;
1549 Usd_PrimDataConstPtr prim = get_pointer(_Prim());
1550 SdfPath proxyPrimPath = _ProxyPrimPath();
1551 Usd_MoveToParent(prim, proxyPrimPath);
1552 return UsdPrim(prim, proxyPrimPath);
1573 const Usd_PrimFlagsPredicate &predicate)
const;
1717 const std::vector<std::string> &nameElts,
1726 const std::vector<std::string> &nameElts,
1768 Usd_PrimFlagsPredicate
const &traversalPredicate,
1769 std::function<
bool (
UsdAttribute const &)>
const &pred =
nullptr,
1770 bool recurseOnSources =
false)
const;
1778 std::function<
bool (
UsdAttribute const &)>
const &pred =
nullptr,
1779 bool recurseOnSources =
false)
const;
1823 bool custom=
true)
const;
1872 Usd_PrimFlagsPredicate
const &traversalPredicate,
1874 bool recurseOnTargets =
false)
const;
1883 bool recurseOnTargets =
false)
const;
1919 const std::string& assetPath,
const SdfPath& primPath)
const;
2032 bool instanceable =
false;
2033 return GetMetadata(SdfFieldKeys->Instanceable, &instanceable) &&
2040 return SetMetadata(SdfFieldKeys->Instanceable, instanceable);
2066 return Usd_IsInstanceProxy(_Prim(), _ProxyPrimPath());
2202 class _ProtoToInstancePathMap {
2205 using _Map = std::vector<std::pair<SdfPath, SdfPath>>;
2219 friend class Usd_PrimData;
2220 friend class Usd_PrimFlagsPredicate;
2221 friend struct Usd_StageImplAccess;
2222 friend struct UsdPrim_RelTargetFinder;
2223 friend struct UsdPrim_AttrConnectionFinder;
2226 UsdPrim(
const Usd_PrimDataHandle &primData,
2228 :
UsdObject(primData, proxyPrimPath) { }
2232 const Usd_PrimDataHandle &prim,
2235 :
UsdObject(objType, prim, proxyPrimPath, propName) {}
2239 _MakeSiblingRange(
const Usd_PrimFlagsPredicate &pred)
const;
2243 _MakeDescendantsRange(
const Usd_PrimFlagsPredicate &pred)
const;
2246 std::vector<UsdProperty>
2252 bool applyOrder=
true,
2256 std::vector<UsdProperty>
2257 _GetPropertiesInNamespace(
const std::string &namespaces,
2258 bool onlyAuthored)
const;
2261 std::vector<UsdAttribute>
2262 _GetAttributes(
bool onlyAuthored,
bool applyOrder=
false)
const;
2265 std::vector<UsdRelationship>
2266 _GetRelationships(
bool onlyAuthored,
bool applyOrder=
false)
const;
2279 {
return _Prim()->GetSourcePrimIndex(); }
2284 _MakeResolveTargetFromEditTarget(
2286 bool makeAsStrongerThan)
const;
2288 _ProtoToInstancePathMap _GetProtoToInstancePathMap()
const;
2295 using _UnderlyingIterator =
const Usd_PrimData*;
2298 UsdPrim* operator->() {
return &_prim; }
2301 explicit _PtrProxy(
const UsdPrim& prim) : _prim(prim) {}
2305 using iterator_category = std::forward_iterator_tag;
2308 using pointer = _PtrProxy;
2309 using difference_type = std::ptrdiff_t;
2334 return equal(other);
2338 return !equal(other);
2347 const Usd_PrimFlagsPredicate &predicate)
2348 : _underlyingIterator(i)
2349 , _proxyPrimPath(proxyPrimPath)
2350 , _predicate(predicate) {
2352 if (_underlyingIterator &&
2353 !Usd_EvalPredicate(_predicate, _underlyingIterator,
2359 return _underlyingIterator == other._underlyingIterator &&
2360 _proxyPrimPath == other._proxyPrimPath &&
2361 _predicate == other._predicate;
2365 if (Usd_MoveToNextSiblingOrParent(_underlyingIterator, _proxyPrimPath,
2367 _underlyingIterator =
nullptr;
2372 reference dereference()
const {
2373 return UsdPrim(_underlyingIterator, _proxyPrimPath);
2376 _UnderlyingIterator _underlyingIterator =
nullptr;
2378 Usd_PrimFlagsPredicate _predicate;
2418 explicit operator bool()
const {
return !
empty(); }
2422 return _begin == other._begin && _end == other._end;
2433 std::advance(_begin, n);
2439 std::advance(_end, n);
2450 return lhs.
equal(rhs);
2454 template <
class ForwardRange>
2456 const ForwardRange& rhs) {
2458 std::is_same<
typename decltype(std::cbegin(rhs))::iterator_category,
2459 std::forward_iterator_tag>::value,
2460 "rhs must be a forward iterator."
2462 return (std::distance(std::cbegin(lhs), std::cend(lhs)) ==
2463 std::distance(std::cbegin(rhs), std::cend(rhs))) &&
2464 std::equal(std::cbegin(lhs), std::cend(lhs), std::cbegin(rhs));
2468 template <
class ForwardRange>
2477 return !lhs.
equal(rhs);
2481 template <
class ForwardRange>
2484 return !(lhs == rhs);
2488 template <
class ForwardRange>
2490 const ForwardRange& rhs) {
2491 return !(lhs == rhs);
2500struct Tf_ShouldIterateOverCopy<
2503struct Tf_ShouldIterateOverCopy<
2509 return _MakeSiblingRange(
2510 Usd_CreatePredicateForTraversal(_Prim(), _ProxyPrimPath(), pred));
2527UsdPrim::_MakeSiblingRange(
const Usd_PrimFlagsPredicate &pred)
const {
2528 Usd_PrimDataConstPtr firstChild = get_pointer(_Prim());
2529 SdfPath firstChildPath = _ProxyPrimPath();
2530 if (!Usd_MoveToChild(firstChild, firstChildPath, pred)) {
2531 firstChild =
nullptr;
2535 return SiblingRange(
2544 using _UnderlyingIterator = Usd_PrimDataConstPtr;
2547 UsdPrim* operator->() {
return &_prim; }
2550 explicit _PtrProxy(
const UsdPrim& prim) : _prim(prim) {}
2554 using iterator_category = std::forward_iterator_tag;
2557 using pointer = _PtrProxy;
2558 using difference_type = std::ptrdiff_t;
2583 return equal(other);
2588 return !equal(other);
2598 const Usd_PrimFlagsPredicate &predicate)
2599 : _underlyingIterator(i)
2600 , _proxyPrimPath(proxyPrimPath)
2601 , _predicate(predicate) {
2603 if (_underlyingIterator &&
2604 !Usd_EvalPredicate(_predicate, _underlyingIterator,
2606 if (Usd_MoveToNextSiblingOrParent(_underlyingIterator,
2607 _proxyPrimPath, _predicate)) {
2608 _underlyingIterator =
nullptr;
2615 return _underlyingIterator == other._underlyingIterator &&
2616 _proxyPrimPath == other._proxyPrimPath &&
2617 _predicate == other._predicate;
2621 if (!Usd_MoveToChild(_underlyingIterator, _proxyPrimPath,
2623 while (Usd_MoveToNextSiblingOrParent(_underlyingIterator,
2629 reference dereference()
const {
2630 return UsdPrim(_underlyingIterator, _proxyPrimPath);
2633 _UnderlyingIterator _underlyingIterator =
nullptr;
2635 Usd_PrimFlagsPredicate _predicate;
2675 explicit operator bool()
const {
2681 return _begin == other._begin && _end == other._end;
2692 std::advance(_begin, n);
2698 std::advance(_end, n);
2709 return lhs.
equal(rhs);
2713 template <
class ForwardRange>
2715 const ForwardRange& rhs) {
2717 std::is_convertible<
2718 typename decltype(std::cbegin(rhs))::iterator_category,
2719 std::forward_iterator_tag>::value,
2720 "rhs must be a forward iterator."
2722 return (std::distance(std::cbegin(lhs), std::cend(lhs)) ==
2723 std::distance(std::cbegin(rhs), std::cend(rhs))) &&
2724 std::equal(std::cbegin(lhs), std::cend(lhs), std::cbegin(rhs));
2728 template <
class ForwardRange>
2737 return !lhs.
equal(rhs);
2741 template <
class ForwardRange>
2744 return !(lhs == rhs);
2748 template <
class ForwardRange>
2750 const ForwardRange& rhs) {
2751 return !(lhs == rhs);
2760struct Tf_ShouldIterateOverCopy<
2763struct Tf_ShouldIterateOverCopy<
2769 return _MakeDescendantsRange(
2770 Usd_CreatePredicateForTraversal(_Prim(), _ProxyPrimPath(), pred));
2787UsdPrim::_MakeDescendantsRange(
const Usd_PrimFlagsPredicate &pred)
const {
2788 Usd_PrimDataConstPtr firstChild = get_pointer(_Prim());
2789 SdfPath firstChildPath = _ProxyPrimPath();
2790 Usd_PrimDataConstPtr endChild = firstChild;
2791 SdfPath endChildPath = firstChildPath;
2792 if (Usd_MoveToChild(firstChild, firstChildPath, pred)) {
2793 while (Usd_MoveToNextSiblingOrParent(endChild, endChildPath, pred)) {}
2796 return SubtreeRange(
2808 return UsdPrim(_prim, _proxyPrimPath);
2811PXR_NAMESPACE_CLOSE_SCOPE
PcpPrimIndex is an index of the all sites of scene description that contribute opinions to a specific...
A path value used to locate objects in layers or scenegraphs.
Represents a payload and all its meta data.
Represents a value type name, i.e.
Token for efficient comparison, assignment, and hashing of known strings.
TfType represents a dynamic runtime type.
The base class for all API schemas.
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Defines a mapping from scene graph paths to Sdf spec paths in a SdfLayer where edits should be direct...
A proxy class for applying listOp edits to the inherit paths list for a prim.
Base class for Usd scenegraph objects, providing common API.
USD_API bool SetMetadata(const TfToken &key, VtValueRef value) const
Set metadatum key's value to value.
USD_API bool HasAuthoredMetadata(const TfToken &key) const
Returns true if the key has an authored value, false if no value was authored or the only value avail...
UsdPrim GetPrim() const
Return this object if it is a prim, otherwise return this object's nearest owning prim.
const SdfPath & GetPrimPath() const
Return this object's path if this object is a prim, otherwise this object's nearest owning prim's pat...
bool GetMetadata(const TfToken &key, T *value) const
Resolve the requested metadatum named key into value, returning true on success.
USD_API bool ClearMetadata(const TfToken &key) const
Clears the authored key's value at the current EditTarget, returning false on error.
UsdPayloads provides an interface to authoring and introspecting payloads.
Class representing the builtin definition of a prim given the schemas registered in the schema regist...
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
SiblingRange GetAllChildren() const
Return all this prim's children as an iterable range.
USD_API UsdResolveTarget MakeResolveTargetUpToEditTarget(const UsdEditTarget &editTarget) const
Creates and returns a resolve target that, when passed to a UsdAttributeQuery for one of this prim's ...
const UsdPrimDefinition & GetPrimDefinition() const
Return this prim's definition based on the prim's type if the type is a registered prim type.
USD_API bool HasPayload() const
const PcpPrimIndex & GetPrimIndex() const
Return the cached prim index containing all sites that can contribute opinions to this prim.
USD_API bool ApplyAPI(const TfToken &schemaFamily, UsdSchemaVersion schemaVersion, const TfToken &instanceName) const
This is an overload of ApplyAPI with instanceName that takes a schemaFamily and schemaVersion to dete...
USD_API bool IsA(const TfType &schemaType) const
This is an overload of IsA that takes a TfType schemaType .
UsdPrim GetPrimInPrototype() const
If this prim is an instance proxy, return the UsdPrim for the corresponding prim in the instance's pr...
USD_API bool HasAPIInFamily(const TfType &schemaType, UsdSchemaRegistry::VersionPolicy versionPolicy) const
Overload for convenience of HasAPIInFamily that finds a registered schema for the given schemaType an...
USD_API bool CanApplyAPI(const TfToken &schemaFamily, UsdSchemaVersion schemaVersion, const TfToken &instanceName, std::string *whyNot=nullptr) const
This is an overload of CanApplyAPI with instanceName that takes a schemaFamily and schemaVersion to d...
bool IsInstanceProxy() const
Return true if this prim is an instance proxy, false otherwise.
USD_API bool RemoveAPI(const TfToken &schemaFamily, UsdSchemaVersion schemaVersion) const
This is an overload of RemoveAPI that takes a schemaFamily and schemaVersion to determine the schema ...
UsdPrim GetParent() const
Return this prim's parent prim.
USD_API bool SetKind(const TfToken &kind) const
Author a kind for this prim, at the current UsdEditTarget.
USD_API TfTokenVector GetAuthoredPropertyNames(const PropertyPredicateFunc &predicate={}) const
Return this prim's property names (attributes and relationships) that have authored scene description...
USD_API bool SetPayload(const SdfPayload &payload) const
UsdPrim()
Construct an invalid prim.
bool IsInstanceable() const
Return true if this prim has been marked as instanceable.
USD_API TfTokenVector GetPropertyNames(const PropertyPredicateFunc &predicate={}) const
Return all of this prim's property names (attributes and relationships), including all builtin proper...
USD_API UsdSpecializes GetSpecializes() const
Return a UsdSpecializes object that allows one to add, remove, or mutate specializes at the currently...
SiblingRange GetChildren() const
Return this prim's active, loaded, defined, non-abstract children as an iterable range.
USD_API bool HasAuthoredSpecializes() const
Returns true if this prim has any authored specializes.
USD_API bool ClearPayload() const
bool CanApplyAPI(const TfToken &instanceName, std::string *whyNot=nullptr) const
Returns whether a multiple-apply API schema with the given C++ type SchemaType can be applied to this...
USD_API UsdResolveTarget MakeResolveTargetStrongerThanEditTarget(const UsdEditTarget &editTarget) const
Creates and returns a resolve target that, when passed to a UsdAttributeQuery for one of this prim's ...
SubtreeRange GetDescendants() const
Return this prim's active, loaded, defined, non-abstract descendants as an iterable range.
bool CanApplyAPI(std::string *whyNot=nullptr) const
Returns whether a single-apply API schema with the given C++ type SchemaType can be applied to this p...
USD_API TfTokenVector GetFilteredChildrenNames(const Usd_PrimFlagsPredicate &predicate) const
Return the names of the child prims in the order they appear when iterating over GetFilteredChildren(...
USD_API std::vector< UsdProperty > GetAuthoredPropertiesInNamespace(const std::string &namespaces) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool SetTypeName(const TfToken &typeName) const
Author this Prim's typeName at the current EditTarget.
USD_API UsdAttribute GetAttribute(const TfToken &attrName) const
Return a UsdAttribute with the name attrName.
USD_API bool HasAuthoredInherits() const
Return true if this prim has any authored inherits.
bool HasAuthoredInstanceable() const
Return true if this prim has an authored opinion for 'instanceable', false otherwise.
USD_API bool RemoveAPI(const TfToken &schemaIdentifier, const TfToken &instanceName) const
This is an overload of RemoveAPI with instanceName that takes a schemaIdentifier to determine the sch...
SubtreeRange GetFilteredDescendants(const Usd_PrimFlagsPredicate &predicate) const
Return a subset of all of this prim's descendants filtered by predicate as an iterable range.
SdfSpecifier GetSpecifier() const
Return this prim's composed specifier.
const UsdPrimTypeInfo & GetPrimTypeInfo() const
Return the prim's full type info composed from its type name, applied API schemas,...
USD_API bool GetKind(TfToken *kind) const
Retrieve the authored kind for this prim.
bool ClearActive() const
Remove the authored 'active' opinion at the current EditTarget.
USD_API bool ApplyAPI(const TfToken &schemaFamily, UsdSchemaVersion schemaVersion) const
This is an overload of ApplyAPI that takes a schemaFamily and schemaVersion to determine the schema t...
USD_API std::vector< UsdProperty > GetPropertiesInNamespace(const std::string &namespaces) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
SubtreeRange GetAllDescendants() const
Return all this prim's descendants as an iterable range.
SiblingRange GetFilteredChildren(const Usd_PrimFlagsPredicate &predicate) const
Return a subset of all of this prim's children filtered by predicate as an iterable range.
USD_API bool IsInFamily(const TfToken &schemaIdentifier, UsdSchemaRegistry::VersionPolicy versionPolicy) const
Overload for convenience of IsInFamily that parses the schema family and version to use from the give...
USD_API UsdInherits GetInherits() const
Return a UsdInherits object that allows one to add, remove, or mutate inherits at the currently set U...
USD_API bool HasAPIInFamily(const TfToken &schemaFamily, const TfToken &instanceName) const
Return true if the prim has a specific instance instanceName of an applied multiple-apply API schema ...
void ClearChildrenReorder() const
Remove the opinion for the metadata used to reorder children of this prim at the current EditTarget.
USD_API bool IsSubComponent() const
Return true if this prim is a subcomponent based on its kind metadata, false otherwise.
USD_API UsdPrim GetPrototype() const
If this prim is an instance, return the UsdPrim for the corresponding prototype.
USD_API bool GetVersionIfHasAPIInFamily(const TfToken &schemaFamily, const TfToken &instanceName, UsdSchemaVersion *schemaVersion) const
Return true if the prim has a specific instance instanceName of an applied multiple-apply API schema ...
USD_API void Unload() const
Unloads this prim and all its descendants.
bool HasAPI() const
Return true if the UsdPrim has had an applied API schema represented by the C++ class type SchemaType...
USD_API TfTokenVector GetAllChildrenNames() const
Return the names of the child prims in the order they appear when iterating over GetAllChildren.
void SetChildrenReorder(const TfTokenVector &order) const
Author an opinion for the metadata used to reorder children of this prim at the current EditTarget.
USD_API std::vector< UsdPrim > GetInstances() const
If this prim is a prototype prim, returns all prims that are instances of this prototype.
USD_API bool IsInFamily(const TfToken &schemaFamily, UsdSchemaVersion schemaVersion, UsdSchemaRegistry::VersionPolicy versionPolicy) const
Return true if the prim's schema type, is or inherits from the schema type of any schema in the given...
USD_API UsdPayloads GetPayloads() const
Return a UsdPayloads object that allows one to add, remove, or mutate payloads at the currently set U...
USD_API UsdProperty GetPropertyAtPath(const SdfPath &path) const
Returns the property at path on the same stage as this prim.
void ClearPropertyOrder() const
Remove the opinion for propertyOrder metadata on this prim at the current EditTarget.
USD_API bool HasAPIInFamily(const TfToken &schemaFamily) const
Return true if the prim has an applied API schema that is any version of the schemas in the given sch...
USD_API UsdVariantSet GetVariantSet(const std::string &variantSetName) const
Retrieve a specifically named VariantSet for editing or constructing a UsdEditTarget.
USD_API bool HasAttribute(const TfToken &attrName) const
Return true if this prim has an attribute named attrName, false otherwise.
USD_API bool HasAPI(const TfToken &schemaFamily, UsdSchemaVersion schemaVersion) const
This is an overload of HasAPI that takes a schemaFamily and schemaVersion to determine the schema typ...
USD_API UsdAttribute GetAttributeAtPath(const SdfPath &path) const
Returns the attribute at path on the same stage as this prim.
USD_API bool HasAPIInFamily(const TfToken &schemaFamily, UsdSchemaVersion schemaVersion, UsdSchemaRegistry::VersionPolicy versionPolicy) const
Return true if the prim has an applied API schema that is a schema in the given schemaFamily that m...
bool HasAPI(const TfToken &instanceName) const
Return true if the UsdPrim has the specific instance, instanceName, of the multiple-apply API schema ...
bool IsPrototype() const
Return true if this prim is an instancing prototype prim, false otherwise.
bool IsLoaded() const
Return true if this prim is active, and either it is loadable and it is loaded, or its nearest loadab...
USD_API UsdPrim GetFilteredNextSibling(const Usd_PrimFlagsPredicate &predicate) const
Return this prim's next sibling that matches predicate if it has one, otherwise return the invalid Us...
USD_API bool AddAppliedSchema(const TfToken &appliedSchemaName) const
Adds the applied API schema name token appliedSchemaName to the apiSchemas metadata for this prim at ...
USD_API bool CanApplyAPI(const TfType &schemaType, const TfToken &instanceName, std::string *whyNot=nullptr) const
This is an overload of CanApplyAPI with instanceName that takes a TfType schemaType .
USD_API bool GetVersionIfIsInFamily(const TfToken &schemaFamily, UsdSchemaVersion *schemaVersion) const
Return true if the prim's schema type, is or inherits from the schema type of any version the schema ...
bool IsA() const
Return true if the prim's schema type, is or inherits from the TfType of the schema class type Schema...
USD_API UsdPrim GetPrimAtPath(const SdfPath &path) const
Returns the prim at path on the same stage as this prim.
UsdPrimSubtreeIterator SubtreeIterator
Convenience typedefs.
USD_API SdfPathVector FindAllAttributeConnectionPaths(Usd_PrimFlagsPredicate const &traversalPredicate, std::function< bool(UsdAttribute const &)> const &pred=nullptr, bool recurseOnSources=false) const
Search the prim subtree rooted at this prim according to traversalPredicate for attributes for which ...
bool IsInPrototype() const
Return true if this prim is a prototype prim or a descendant of a prototype prim, false otherwise.
USD_API bool SetPayload(const SdfLayerHandle &layer, const SdfPath &primPath) const
void SetPropertyOrder(const TfTokenVector &order) const
Author an opinion for propertyOrder metadata on this prim at the current EditTarget.
static USD_API bool IsPrototypePath(const SdfPath &path)
Return true if the given path identifies a prototype prim, false otherwise.
USD_API bool HasAPIInFamily(const TfToken &schemaIdentifier, UsdSchemaRegistry::VersionPolicy versionPolicy, const TfToken &instanceName) const
Overload for convenience of HasAPIInFamily that parses the schema family and version to use from the ...
USD_API bool HasAPI(const TfType &schemaType) const
This is an overload of HasAPI that takes a TfType schemaType .
USD_API bool CanApplyAPI(const TfType &schemaType, std::string *whyNot=nullptr) const
This is an overload of CanApplyAPI that takes a TfType schemaType .
USD_API bool IsPseudoRoot() const
Returns true if the prim is the pseudo root.
USD_API bool HasProperty(const TfToken &propName) const
Return true if this prim has an property named propName, false otherwise.
bool HasClassSpecifier() const
Return true if this prim has the specifier SdfSpecifierClass.
USD_API std::vector< std::pair< SdfPrimSpecHandle, SdfLayerOffset > > GetPrimStackWithLayerOffsets() const
Return all the authored SdfPrimSpecs that may contain opinions for this prim in order from strong to ...
bool IsInstance() const
Return true if this prim is an instance of a prototype, false otherwise.
USD_API UsdAttribute 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 o...
USD_API SdfPrimSpecHandleVector GetPrimStack() const
Return all the authored SdfPrimSpecs that may contain opinions for this prim in order from strong to ...
USD_API SdfPathVector FindAllRelationshipTargetPaths(std::function< bool(UsdRelationship const &)> const &pred=nullptr, bool recurseOnTargets=false) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool HasAuthoredActive() const
Return true if this prim has an authored opinion for 'active', false otherwise.
USD_API bool HasVariantSets() const
Return true if this prim has any authored VariantSets.
bool IsDefined() const
Return true if this prim and all its ancestors have defining specifiers, false otherwise.
USD_API bool IsA(const TfToken &schemaIdentifier) const
This is an overload of IsA that takes a schemaIdentifier to determine the schema type.
USD_API bool RemoveAPI(const TfToken &schemaIdentifier) const
This is an overload of RemoveAPI that takes a schemaIdentifier to determine the schema type.
USD_API const TfTokenVector & GetAppliedSchemas() const
Return a vector containing the names of API schemas which have been applied to this prim.
USD_API UsdPrim GetChild(const TfToken &name) const
Return this prim's direct child named name if it has one, otherwise return an invalid UsdPrim.
bool HasAPIInFamily(UsdSchemaRegistry::VersionPolicy versionPolicy, const TfToken &instanceName) const
Overload for convenience of HasAPIInFamily that finds a registered schema for the C++ schema class Sc...
USD_API UsdPrim GetNextSibling() const
Return this prim's next active, loaded, defined, non-abstract sibling if it has one,...
USD_API bool CanApplyAPI(const TfToken &schemaIdentifier, std::string *whyNot=nullptr) const
This is an overload of CanApplyAPI that takes a schemaIdentifier to determine the schema type.
USD_API bool IsInFamily(const TfToken &schemaFamily) const
Return true if the prim's schema type is or inherits from the schema type of any version of the schem...
USD_API std::vector< UsdProperty > GetAuthoredPropertiesInNamespace(const std::vector< std::string > &namespaces) const
Like GetPropertiesInNamespace(), but exclude properties that do not have authored scene description f...
USD_API bool RemoveAPI(const TfType &schemaType) const
This is an overload of RemoveAPI that takes a TfType schemaType .
USD_API UsdAttribute 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 e...
USD_API bool IsInFamily(const TfType &schemaType, UsdSchemaRegistry::VersionPolicy versionPolicy) const
Overload for convenience of IsInFamily that finds a registered schema for the given schemaType and us...
USD_API bool HasAuthoredPayloads() const
Return true if this prim has any authored payloads.
USD_API UsdRelationship CreateRelationship(const TfToken &relName, bool custom=true) const
Author scene description for the relationship named relName at the current EditTarget if none already...
USD_API UsdVariantSets GetVariantSets() const
Return a UsdVariantSets object representing all the VariantSets present on this prim.
USD_API UsdObject GetObjectAtPath(const SdfPath &path) const
Returns the object at path on the same stage as this prim.
USD_API bool RemoveAPI(const TfType &schemaType, const TfToken &instanceName) const
This is an overload of RemoveAPI with instanceName that takes a TfType schemaType .
USD_API bool HasAuthoredReferences() const
Return true if this prim has any authored references.
USD_API std::vector< UsdRelationship > GetAuthoredRelationships() const
Like GetRelationships(), but exclude relationships without authored scene description from the result...
const TfToken & GetTypeName() const
Return this prim's composed type name.
std::function< bool(const TfToken &propertyName)> PropertyPredicateFunc
Alias for the "predicate" function parameter passed into the various Get{Authored}{PropertyNames,...
USD_API UsdRelationship 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 o...
USD_API std::vector< UsdProperty > GetProperties(const PropertyPredicateFunc &predicate={}) const
Return all of this prim's properties (attributes and relationships), including all builtin properties...
USD_API bool ApplyAPI(const TfType &schemaType, const TfToken &instanceName) const
This is an overload of ApplyAPI with instanceName that takes a TfType schemaType .
bool RemoveAPI(const TfToken &instanceName) const
Removes a multiple-apply API schema with the given C++ type 'SchemaType' and instance name instanceNa...
USD_API UsdAttribute 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 o...
USD_API bool HasAPIInFamily(const TfToken &schemaFamily, UsdSchemaVersion schemaVersion, UsdSchemaRegistry::VersionPolicy versionPolicy, const TfToken &instanceName) const
Return true if the prim has a specific instance instanceName of an applied multiple-apply API schema ...
USD_API bool CanApplyAPI(const TfToken &schemaIdentifier, const TfToken &instanceName, std::string *whyNot=nullptr) const
This is an overload of CanApplyAPI with instanceName that takes a schemaIdentifier to determine the s...
USD_API TfTokenVector GetPropertyOrder() const
Return the strongest propertyOrder metadata value authored on this prim.
bool RemoveAPI() const
Removes a single-apply API schema with the given C++ type SchemaType from this prim in the current ed...
USD_API bool HasAPI(const TfToken &schemaIdentifier, const TfToken &instanceName) const
This is an overload of HasAPI with instanceName that takes a schemaIdentifier to determine the schema...
USD_API UsdProperty GetProperty(const TfToken &propName) const
Return a UsdProperty with the name propName.
USD_API bool HasAPI(const TfToken &schemaFamily, UsdSchemaVersion schemaVersion, const TfToken &instanceName) const
This is an overload of HasAPI with instanceName that takes a schemaFamily and schemaVersion to determ...
bool SetSpecifier(SdfSpecifier specifier) const
Author an opinion for this Prim's specifier at the current edit target.
USD_API bool SetPayload(const std::string &assetPath, const SdfPath &primPath) const
bool IsComponent() const
Return true if this prim is a component model based on its kind metadata, false otherwise.
UsdPrimSiblingIterator SiblingIterator
Convenience typedefs.
bool IsActive() const
Return true if this prim is active, meaning neither it nor any of its ancestors have active=false.
USD_API UsdAttribute 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 o...
static USD_API bool IsPathInPrototype(const SdfPath &path)
Return true if the given path identifies a prototype prim or a prim or property descendant of a proto...
bool SetActive(bool active) const
Author 'active' metadata for this prim at the current EditTarget.
bool HasDefiningSpecifier() const
Return true if this prim has the specifier SdfSpecifierDef or SdfSpecifierClass.
USD_API std::vector< UsdAttribute > GetAttributes() const
Like GetProperties(), but exclude all relationships from the result.
USD_API TfTokenVector GetChildrenNames() const
Return the names of the child prims in the order they appear when iterating over GetChildren.
static USD_API void ApplyPropertyOrder(const TfTokenVector &order, TfTokenVector *names)
Change the order of items in 'names' so that all the things in 'order' that are also in 'names' are a...
USD_API TfTokenVector GetChildrenReorder() const
Return the strongest opinion for the metadata used to reorder children of this prim.
USD_API SdfPathVector FindAllRelationshipTargetPaths(Usd_PrimFlagsPredicate const &traversalPredicate, std::function< bool(UsdRelationship const &)> const &pred=nullptr, bool recurseOnTargets=false) const
Search the prim subtree rooted at this prim according to traversalPredicate for relationships for whi...
USD_API UsdReferences GetReferences() const
Return a UsdReferences object that allows one to add, remove, or mutate references at the currently s...
USD_API void Load(UsdLoadPolicy policy=UsdLoadWithDescendants) const
Load this prim, all its ancestors, and by default all its descendants.
USD_API bool RemoveAppliedSchema(const TfToken &appliedSchemaName) const
Removes the applied API schema name token appliedSchemaName from the apiSchemas metadata for this pri...
USD_API SdfPathVector FindAllAttributeConnectionPaths(std::function< bool(UsdAttribute const &)> const &pred=nullptr, bool recurseOnSources=false) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
USD_API bool ApplyAPI(const TfType &schemaType) const
This is an overload of ApplyAPI that takes a TfType schemaType .
USD_API bool RemoveProperty(const TfToken &propName)
Remove all scene description for the property with the given propName in the current UsdEditTarget.
bool ApplyAPI() const
Applies a single-apply API schema with the given C++ type SchemaType to this prim in the current edit...
bool IsGroup() const
Return true if this prim is a model group based on its kind metadata, false otherwise.
USD_API std::vector< UsdRelationship > GetRelationships() const
Like GetProperties(), but exclude all attributes from the result.
USD_API PcpPrimIndex ComputeExpandedPrimIndex() const
Compute the prim index containing all sites that could contribute opinions to this prim.
bool SetInstanceable(bool instanceable) const
Author 'instanceable' metadata for this prim at the current EditTarget.
bool IsModel() const
Return true if this prim is a model based on its kind metadata, false otherwise.
bool ClearInstanceable() const
Remove the authored 'instanceable' opinion at the current EditTarget.
USD_API UsdRelationship GetRelationship(const TfToken &relName) const
Return a UsdRelationship with the name relName.
bool ApplyAPI(const TfToken &instanceName) const
Applies a multiple-apply API schema with the given C++ type SchemaType and instance name instanceName...
USD_API bool RemoveAPI(const TfToken &schemaFamily, UsdSchemaVersion schemaVersion, const TfToken &instanceName) const
This is an overload of RemoveAPI with instanceName that takes a schemaFamily and schemaVersion to det...
USD_API bool HasAPIInFamily(const TfToken &schemaIdentifier, UsdSchemaRegistry::VersionPolicy versionPolicy) const
Overload for convenience of HasAPIInFamily that parses the schema family and version to use from the ...
USD_API bool IsA(const TfToken &schemaFamily, UsdSchemaVersion schemaVersion) const
This is an overload of IsA that takes a schemaFamily and schemaVersion to determine the schema type.
USD_API bool GetVersionIfHasAPIInFamily(const TfToken &schemaFamily, UsdSchemaVersion *schemaVersion) const
Return true if the prim has an applied API schema that is any version the schemas in the given schema...
USD_API bool CanApplyAPI(const TfToken &schemaFamily, UsdSchemaVersion schemaVersion, std::string *whyNot=nullptr) const
This is an overload of CanApplyAPI that takes a schemaFamily and schemaVersion to determine the schem...
USD_API bool ApplyAPI(const TfToken &schemaIdentifier, const TfToken &instanceName) const
This is an overload of ApplyAPI with instanceName that takes a schemaIdentifier to determine the sche...
USD_API bool HasAPI(const TfToken &schemaIdentifier) const
This is an overload of HasAPI that takes a schemaIdentifier to determine the schema type.
USD_API bool HasAPI(const TfType &schemaType, const TfToken &instanceName) const
This is an overload of HasAPI with instanceName that takes a TfType schemaType .
USD_API bool HasRelationship(const TfToken &relName) const
Return true if this prim has a relationship named relName, false otherwise.
bool HasAuthoredTypeName() const
Return true if a typeName has been authored.
USD_API UsdRelationship GetRelationshipAtPath(const SdfPath &path) const
Returns the relationship at path on the same stage as this prim.
USD_API std::vector< UsdProperty > GetPropertiesInNamespace(const std::vector< std::string > &namespaces) const
Return this prim's properties that are inside the given property namespace ordered according to the s...
USD_API std::vector< UsdProperty > GetAuthoredProperties(const PropertyPredicateFunc &predicate={}) const
Return this prim's properties (attributes and relationships) that have authored scene description,...
USD_API bool ApplyAPI(const TfToken &schemaIdentifier) const
This is an overload of ApplyAPI that takes a schemaIdentifier to determine the schema type.
bool IsAbstract() const
Return true if this prim or any of its ancestors is a class.
bool HasAPIInFamily(UsdSchemaRegistry::VersionPolicy versionPolicy) const
Overload for convenience of HasAPIInFamily that finds a registered schema for the C++ schema class Sc...
USD_API std::vector< UsdAttribute > GetAuthoredAttributes() const
Like GetAttributes(), but exclude attributes without authored scene description from the result.
USD_API bool HasAPIInFamily(const TfType &schemaType, UsdSchemaRegistry::VersionPolicy versionPolicy, const TfToken &instanceName) const
Overload for convenience of HasAPIInFamily that finds a registered schema for the given schemaType an...
bool IsInFamily(UsdSchemaRegistry::VersionPolicy versionPolicy) const
Overload for convenience of IsInFamily that finds a registered schema for the C++ schema class Schema...
bool ClearTypeName() const
Clear the opinion for this Prim's typeName at the current edit target.
An forward-iterable range that traverses a subtree of prims rooted at a given prim in depth-first ord...
Forward traversal iterator of sibling UsdPrim s.
UsdPrimSiblingIterator & operator++()
Preincrement.
reference operator*() const
Dereference.
UsdPrimSiblingIterator operator++(int)
Postincrement.
pointer operator->() const
Indirection.
Forward iterator range of sibling UsdPrim s.
reference front() const
Return *begin(). This range must not be empty.
iterator begin() const
First iterator.
UsdPrimSiblingIterator iterator
Iterator type.
const_iterator cbegin() const
First iterator.
UsdPrimSiblingRange & advance_end(difference_type n)
Advance this range's end iterator.
UsdPrimSiblingRange(UsdPrimSiblingIterator begin, UsdPrimSiblingIterator end)
Construct with a pair of iterators.
bool empty() const
Return begin() == end().
iterator end() const
Past-the-end iterator.
iterator::reference reference
Iterator reference_type.
friend bool operator!=(const UsdPrimSiblingRange &lhs, const ForwardRange &rhs)
Inequality comparison.
friend bool operator==(const UsdPrimSiblingRange &lhs, const ForwardRange &rhs)
Equality comparison.
const_iterator cend() const
Past-the-end iterator.
friend bool operator==(const ForwardRange &lhs, const UsdPrimSiblingRange &rhs)
Equality comparison.
friend bool operator!=(const ForwardRange &lhs, const UsdPrimSiblingRange &rhs)
Inequality comparison.
bool equal(const UsdPrimSiblingRange &other) const
Equality compare.
iterator::value_type value_type
Iterator value_type.
UsdPrimSiblingRange & advance_begin(difference_type n)
Advance this range's begin iterator.
std::ptrdiff_t difference_type
Iterator difference type.
friend bool operator!=(const UsdPrimSiblingRange &lhs, const UsdPrimSiblingRange &rhs)
Inequality comparison.
friend bool operator==(const UsdPrimSiblingRange &lhs, const UsdPrimSiblingRange &rhs)
Equality comparison.
UsdPrimSiblingIterator const_iterator
Const iterator type.
Forward traversal iterator of sibling UsdPrim s.
bool operator==(const UsdPrimSubtreeIterator &other) const
Equality.
UsdPrimSubtreeIterator & operator++()
Preincrement.
reference operator*() const
Dereference.
UsdPrimSubtreeIterator operator++(int)
Postincrement.
bool operator!=(const UsdPrimSubtreeIterator &other) const
Inequality.
pointer operator->() const
Indirection.
Forward iterator range of sibling UsdPrim s.
reference front() const
Return *begin(). This range must not be empty.
iterator begin() const
First iterator.
UsdPrimSubtreeIterator const_iterator
Const iterator type.
const_iterator cbegin() const
First iterator.
UsdPrimSubtreeIterator iterator
Iterator type.
friend bool operator==(const ForwardRange &lhs, const UsdPrimSubtreeRange &rhs)
Equality comparison.
bool empty() const
Return begin() == end().
iterator end() const
Past-the-end iterator.
iterator::reference reference
Iterator reference_type.
friend bool operator==(const UsdPrimSubtreeRange &lhs, const UsdPrimSubtreeRange &rhs)
Equality comparison.
UsdPrimSubtreeRange & advance_end(difference_type n)
Advance this range's end iterator.
const_iterator cend() const
Past-the-end iterator.
bool equal(const UsdPrimSubtreeRange &other) const
Equality compare.
UsdPrimSubtreeRange(UsdPrimSubtreeIterator begin, UsdPrimSubtreeIterator end)
Construct with a pair of iterators.
friend bool operator!=(const UsdPrimSubtreeRange &lhs, const UsdPrimSubtreeRange &rhs)
Inequality comparison.
iterator::value_type value_type
Iterator value_type.
UsdPrimSubtreeRange & advance_begin(difference_type n)
Advance this range's begin iterator.
std::ptrdiff_t difference_type
Iterator difference type.
friend bool operator==(const UsdPrimSubtreeRange &lhs, const ForwardRange &rhs)
Equality comparison.
friend bool operator!=(const UsdPrimSubtreeRange &lhs, const ForwardRange &rhs)
Inequality comparison.
friend bool operator!=(const ForwardRange &lhs, const UsdPrimSubtreeRange &rhs)
Inequality comparison.
Class that holds the full type information for a prim.
Base class for UsdAttribute and UsdRelationship scenegraph objects.
UsdReferences provides an interface to authoring and introspecting references in Usd.
A UsdRelationship creates dependencies between scenegraph objects by allowing a prim to target other ...
Defines a subrange of nodes and layers within a prim's prim index to consider when performing value r...
The base class for all schema types in Usd.
UsdSchemaVersion version
The version number of the schema within its schema family.
TfToken family
The name of the family of schema's which the schema is a version of.
VersionPolicy
A policy for filtering by schema version when querying for schemas in a particular schema family.
Structure that holds the information about a schema that is registered with the schema registry.
A proxy class for applying listOp edits to the specializes list for a prim.
The outermost container for scene description, which owns and presents composed prims as a scenegraph...
A UsdVariantSet represents a single VariantSet in USD (e.g.
UsdVariantSets represents the collection of VariantSets that are present on a UsdPrim.
UsdLoadPolicy
Controls UsdStage::Load() and UsdPrim::Load() behavior regarding whether or not descendant prims are ...
@ UsdLoadWithDescendants
Load a prim plus all its descendants.
Standard pointer typedefs.
#define TF_DEV_AXIOM(cond)
The same as TF_AXIOM, but compiled only in dev builds.
#define TF_CODING_ERROR(fmt, args)
Issue an internal programming error, but continue execution.
unspecified UsdPrimDefaultPredicate
The default predicate used for prim traversals in methods like UsdPrim::GetChildren,...
unspecified UsdPrimAllPrimsPredicate
Predicate that includes all prims.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.
SdfSpecifier
An enum that identifies the possible specifiers for an SdfPrimSpec.
SdfVariability
An enum that identifies variability types for attributes.
UsdObjType
Enum values to represent the various Usd object types.