7 #ifndef PXR_USD_USD_PRIM_H
8 #define PXR_USD_USD_PRIM_H
31 #include <type_traits>
183 std::vector<std::pair<SdfPrimSpecHandle, SdfLayerOffset>>
189 return SetMetadata(SdfFieldKeys->Specifier, specifier);
203 return SetMetadata(SdfFieldKeys->TypeName, typeName);
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>
595 "Provided type must derive UsdSchemaBase.");
596 return _IsA(UsdSchemaRegistry::FindSchemaInfo<SchemaType>());
601 bool IsA(
const TfType& schemaType)
const;
606 bool IsA(
const TfToken& schemaIdentifier)
const;
638 template <
typename SchemaType>
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,
741 template <
typename SchemaType>
745 "Provided type must derive UsdAPISchemaBase.");
747 "Provided type must not be UsdAPISchemaBase.");
751 "Provided schema type must be an applied API schema.");
753 return _HasAPI(UsdSchemaRegistry::FindSchemaInfo<SchemaType>());
761 template <
typename SchemaType>
765 "Provided type must derive UsdAPISchemaBase.");
767 "Provided type must not be UsdAPISchemaBase.");
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;
809 const TfToken& instanceName)
const;
825 const TfToken &schemaFamily)
const;
835 const TfToken &instanceName)
const;
862 const TfToken &instanceName)
const;
868 template <
typename SchemaType>
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 {
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;
1011 template <
typename SchemaType>
1014 "Provided type must derive UsdAPISchemaBase.");
1016 "Provided type must not be UsdAPISchemaBase.");
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 "
1029 return _CanApplySingleApplyAPI(*schemaInfo, whyNot);
1045 template <
typename SchemaType>
1047 std::string *whyNot =
nullptr)
const {
1049 "Provided type must derive UsdAPISchemaBase.");
1051 "Provided type must not be UsdAPISchemaBase.");
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 "
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;
1101 std::string *whyNot =
nullptr)
const;
1111 std::string *whyNot =
nullptr)
const;
1134 template <
typename SchemaType>
1137 "Provided type must derive UsdAPISchemaBase.");
1139 "Provided type must not be UsdAPISchemaBase.");
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 "
1152 return _ApplySingleApplyAPI(*schemaInfo);
1175 template <
typename SchemaType>
1178 "Provided type must derive UsdAPISchemaBase.");
1180 "Provided type must not be UsdAPISchemaBase.");
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 "
1193 return _ApplyMultipleApplyAPI(*schemaInfo, instanceName);
1204 const TfToken& instanceName)
const;
1216 const TfToken& instanceName)
const;
1230 const TfToken& instanceName)
const;
1254 template <
typename SchemaType>
1257 "Provided type must derive UsdAPISchemaBase.");
1259 "Provided type must not be UsdAPISchemaBase.");
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 "
1272 return _RemoveSingleApplyAPI(*schemaInfo);
1296 template <
typename SchemaType>
1299 "Provided type must derive UsdAPISchemaBase.");
1301 "Provided type must not be UsdAPISchemaBase.");
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 "
1314 return _RemoveMultipleApplyAPI(*schemaInfo, instanceName);
1325 const TfToken& instanceName)
const;
1337 const TfToken& instanceName)
const;
1351 const TfToken& instanceName)
const;
1552 return UsdPrim(prim, proxyPrimPath);
1717 const std::vector<std::string> &nameElts,
1726 const std::vector<std::string> &nameElts,
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;
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);
2202 class _ProtoToInstancePathMap {
2205 using _Map = std::vector<std::pair<SdfPath, SdfPath>>;
2228 :
UsdObject(primData, proxyPrimPath) { }
2235 :
UsdObject(objType, prim, proxyPrimPath, propName) {}
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;
2284 _MakeResolveTargetFromEditTarget(
2286 bool makeAsStrongerThan)
const;
2288 _ProtoToInstancePathMap _GetProtoToInstancePathMap()
const;
2301 explicit _PtrProxy(
const UsdPrim& prim) : _prim(prim) {}
2334 return equal(other);
2338 return !equal(other);
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;
2367 _underlyingIterator =
nullptr;
2373 return UsdPrim(_underlyingIterator, _proxyPrimPath);
2376 _UnderlyingIterator _underlyingIterator =
nullptr;
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."
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);
2509 return _MakeSiblingRange(
2531 firstChild =
nullptr;
2550 explicit _PtrProxy(
const UsdPrim& prim) : _prim(prim) {}
2583 return equal(other);
2588 return !equal(other);
2599 : _underlyingIterator(i)
2600 , _proxyPrimPath(proxyPrimPath)
2601 , _predicate(predicate) {
2603 if (_underlyingIterator &&
2604 !Usd_EvalPredicate(_predicate, _underlyingIterator,
2607 _proxyPrimPath, _predicate)) {
2608 _underlyingIterator =
nullptr;
2615 return _underlyingIterator == other._underlyingIterator &&
2616 _proxyPrimPath == other._proxyPrimPath &&
2617 _predicate == other._predicate;
2630 return UsdPrim(_underlyingIterator, _proxyPrimPath);
2633 _UnderlyingIterator _underlyingIterator =
nullptr;
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."
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);
2769 return _MakeDescendantsRange(
2791 SdfPath endChildPath = firstChildPath;
2808 return UsdPrim(_prim, _proxyPrimPath);
2813 #endif // PXR_USD_USD_PRIM_H
UsdPrimSubtreeIterator iterator
Iterator type.
USD_API bool IsSubComponent() const
bool HasAPIInFamily(UsdSchemaRegistry::VersionPolicy versionPolicy, const TfToken &instanceName) const
std::ptrdiff_t difference_type
Iterator difference type.
USD_API SdfPrimSpecHandleVector GetPrimStack() const
void Usd_MoveToParent(PrimDataPtr &p, SdfPath &proxyPrimPath)
UsdPrimSubtreeIterator const_iterator
Const iterator type.
UsdPrimSubtreeIterator operator++(int)
Postincrement.
USD_API const class PcpPrimIndex & GetPrimIndex() const
iterator::value_type value_type
Iterator value_type.
USD_API UsdResolveTarget MakeResolveTargetStrongerThanEditTarget(const UsdEditTarget &editTarget) const
pointer operator->() const
Indirection.
reference operator*() const
Dereference.
Usd_PrimFlagsPredicate Usd_CreatePredicateForTraversal(const PrimDataPtr &p, const SdfPath &proxyPrimPath, Usd_PrimFlagsPredicate pred)
USD_API bool HasAuthoredPayloads() const
Return true if this prim has any authored payloads.
std::ptrdiff_t difference_type
iterator begin() const
First iterator.
UsdPrim GetPrimInPrototype() const
friend bool operator==(const UsdPrimSiblingRange &lhs, const ForwardRange &rhs)
Equality comparison.
bool HasClassSpecifier() const
Return true if this prim has the specifier SdfSpecifierClass.
USD_API UsdVariantSet GetVariantSet(const std::string &variantSetName) const
USD_API std::vector< UsdAttribute > GetAuthoredAttributes() const
bool CanApplyAPI(std::string *whyNot=nullptr) const
friend bool operator!=(const UsdPrimSiblingRange &lhs, const UsdPrimSiblingRange &rhs)
Inequality comparison.
SiblingRange GetChildren() const
USD_API bool HasAuthoredInherits() const
Return true if this prim has any authored inherits.
USD_API bool HasAuthoredMetadata(const TfToken &key) const
#define PXR_NAMESPACE_OPEN_SCOPE
GLsizei const GLfloat * value
SdfSpecifier GetSpecifier() const
Return this prim's composed specifier.
bool HasAuthoredInstanceable() const
pointer operator->() const
Indirection.
USD_API SdfPathVector FindAllRelationshipTargetPaths(Usd_PrimFlagsPredicate const &traversalPredicate, std::function< bool(UsdRelationship const &)> const &pred=nullptr, bool recurseOnTargets=false) const
USD_API bool IsInFamily(const TfToken &schemaFamily) const
UsdPrimSiblingRange SiblingRange
void ClearPropertyOrder() const
GLsizei const GLchar *const * path
USD_API UsdRelationship CreateRelationship(const TfToken &relName, bool custom=true) const
static USD_API bool IsPathInPrototype(const SdfPath &path)
SiblingRange GetAllChildren() const
Return all this prim's children as an iterable range.
const UsdPrimTypeInfo & GetPrimTypeInfo() const
USD_API UsdAttribute CreateAttribute(const TfToken &name, const SdfValueTypeName &typeName, bool custom, SdfVariability variability=SdfVariabilityVarying) const
USD_API SdfPathVector FindAllAttributeConnectionPaths(Usd_PrimFlagsPredicate const &traversalPredicate, std::function< bool(UsdAttribute const &)> const &pred=nullptr, bool recurseOnSources=false) const
bool IsInstanceProxy() const
SubtreeRange GetAllDescendants() const
USD_API TfTokenVector GetAllChildrenNames() const
USD_API SdfSpecifier GetSpecifier() const
Return this prim's composed specifier.
USD_API bool HasAuthoredReferences() const
Return true if this prim has any authored references.
void ClearChildrenReorder() const
friend bool operator==(const UsdPrimSubtreeRange &lhs, const ForwardRange &rhs)
Equality comparison.
USD_API bool SetMetadata(const TfToken &key, VtValueRef value) const
UsdPrimSiblingRange(UsdPrimSiblingIterator begin, UsdPrimSiblingIterator end)
Construct with a pair of iterators.
const UsdPrimDefinition & GetPrimDefinition() const
IMATH_HOSTDEVICE constexpr bool equal(T1 a, T2 b, T3 t) IMATH_NOEXCEPT
friend bool operator==(const UsdPrimSiblingRange &lhs, const UsdPrimSiblingRange &rhs)
Equality comparison.
USD_API UsdProperty GetPropertyAtPath(const SdfPath &path) const
bool operator==(const UsdPrimSiblingIterator &other) const
USD_API UsdPrim GetPrimAtPath(const SdfPath &path) const
USD_API bool GetVersionIfHasAPIInFamily(const TfToken &schemaFamily, UsdSchemaVersion *schemaVersion) const
friend bool operator!=(const UsdPrimSubtreeRange &lhs, const UsdPrimSubtreeRange &rhs)
Inequality comparison.
**But if you need a result
USD_API bool HasProperty(const TfToken &propName) const
USD_API void Load(UsdLoadPolicy policy=UsdLoadWithDescendants) const
USD_API bool RemoveProperty(const TfToken &propName)
bool GetMetadata(const TfToken &key, T *value) const
USD_API bool ClearMetadata(const TfToken &key) const
USD_API bool RemoveAppliedSchema(const TfToken &appliedSchemaName) const
USD_API std::vector< UsdProperty > GetAuthoredProperties(const PropertyPredicateFunc &predicate={}) const
Y * get_pointer(TfWeakPtrFacade< X, Y > const &p)
bool HasAPI(const TfToken &instanceName) const
USD_API UsdPrim GetPrototype() const
UsdPrimSiblingIterator & operator++()
Preincrement.
USD_API TfTokenVector GetPropertyNames(const PropertyPredicateFunc &predicate={}) const
USD_API std::vector< UsdProperty > GetProperties(const PropertyPredicateFunc &predicate={}) const
GLenum GLuint GLint GLint layer
friend struct UsdPrim_AttrConnectionFinder
unsigned int UsdSchemaVersion
Schema versions are specified as a single unsigned integer value.
bool equal(const UsdPrimSiblingRange &other) const
Equality compare.
USD_API bool ClearPayload() const
UsdPrimSiblingRange & advance_begin(difference_type n)
Advance this range's begin iterator.
const_iterator cbegin() const
First iterator.
UsdPrimSiblingRange & advance_end(difference_type n)
Advance this range's end iterator.
friend bool operator!=(const UsdPrimSubtreeRange &lhs, const ForwardRange &rhs)
Inequality comparison.
bool IsInFamily(UsdSchemaRegistry::VersionPolicy versionPolicy) const
bool IsPrototype() const
Return true if this prim is a shared prototype prim, false otherwise.
iterator end() const
Past-the-end iterator.
bool RemoveAPI(const TfToken &instanceName) const
#define TF_DEV_AXIOM(cond)
friend bool operator!=(const ForwardRange &lhs, const UsdPrimSiblingRange &rhs)
Inequality comparison.
USD_API UsdProperty GetProperty(const TfToken &propName) const
reference front() const
Return *begin(). This range must not be empty.
friend bool operator!=(const UsdPrimSiblingRange &lhs, const ForwardRange &rhs)
Inequality comparison.
USD_API bool IsSubComponent() const
USD_API const class PcpPrimIndex & GetSourcePrimIndex() const
reference operator*() const
Dereference.
static USD_API void ApplyPropertyOrder(const TfTokenVector &order, TfTokenVector *names)
USD_API bool HasAttribute(const TfToken &attrName) const
USD_API bool HasRelationship(const TfToken &relName) const
USD_API void Unload() const
std::vector< class SdfPath > SdfPathVector
USD_API TfTokenVector GetFilteredChildrenNames(const Usd_PrimFlagsPredicate &predicate) const
UsdPrimSiblingIterator iterator
Iterator type.
bool Usd_IsInstanceProxy(const PrimDataPtr &p, const SdfPath &proxyPrimPath)
USD_API bool HasAuthoredSpecializes() const
Returns true if this prim has any authored specializes.
USD_API UsdReferences GetReferences() const
bool HasClassSpecifier() const
Return true if this prim has the specifier SdfSpecifierClass.
const SdfPath & GetPrimPath() const
bool SetInstanceable(bool instanceable) const
USD_API UsdAttribute GetAttributeAtPath(const SdfPath &path) const
bool HasAuthoredActive() const
bool operator==(const UsdPrimSubtreeIterator &other) const
Equality.
const_iterator cend() const
Past-the-end iterator.
const UsdPrimDefinition & GetPrimDefinition() const
Returns the prim definition for this prim.
static USD_API bool IsPrototypePath(const SdfPath &path)
void SetPropertyOrder(const TfTokenVector &order) const
USD_API bool AddAppliedSchema(const TfToken &appliedSchemaName) const
UsdPrimSiblingIterator const_iterator
Const iterator type.
GLdouble GLdouble GLint GLint order
USD_API bool SetPayload(const SdfPayload &payload) const
bool ApplyAPI(const TfToken &instanceName) const
std::forward_iterator_tag iterator_category
std::function< bool(const TfToken &propertyName)> PropertyPredicateFunc
std::vector< TfToken > TfTokenVector
Convenience types.
friend bool operator==(const ForwardRange &lhs, const UsdPrimSubtreeRange &rhs)
Equality comparison.
friend struct UsdPrim_RelTargetFinder
friend bool operator==(const UsdPrimSubtreeRange &lhs, const UsdPrimSubtreeRange &rhs)
Equality comparison.
const SdfPath & _ProxyPrimPath() const
bool IsAbstract() const
Return true if this prim or any of its ancestors is a class.
bool HasDefiningSpecifier() const
friend bool operator==(const ForwardRange &lhs, const UsdPrimSiblingRange &rhs)
Equality comparison.
GLuint const GLchar * name
USD_API const TfTokenVector & GetAppliedSchemas() const
USD_API PcpPrimIndex ComputeExpandedPrimIndex() const
bool HasAuthoredTypeName() const
Return true if a typeName has been authored.
USD_API UsdRelationship GetRelationshipAtPath(const SdfPath &path) const
bool ClearInstanceable() const
void SetChildrenReorder(const TfTokenVector &order) const
UsdPrim GetParent() const
USD_API UsdPayloads GetPayloads() const
bool ClearTypeName() const
that also have some descendant prim *whose name begins with which in turn has a child named baz where *the predicate active
bool Usd_MoveToChild(PrimDataPtr &p, SdfPath &proxyPrimPath, PrimDataPtr end, const Usd_PrimFlagsPredicate &pred)
USD_API TfTokenVector GetAuthoredPropertyNames(const PropertyPredicateFunc &predicate={}) const
const Usd_PrimData * Usd_PrimDataConstPtr
bool IsAbstract() const
Return true if this prim or any of its ancestors is a class.
USD_API UsdInherits GetInherits() const
USD_API UsdPrim GetNextSibling() const
UsdPrimSubtreeRange & advance_end(difference_type n)
Advance this range's end iterator.
iterator end() const
Past-the-end iterator.
USD_API UsdVariantSets GetVariantSets() const
friend struct Usd_StageImplAccess
UsdPrimSiblingIterator operator++(int)
Postincrement.
const Usd_PrimDataHandle & _Prim() const
SubtreeRange GetDescendants() const
reference front() const
Return *begin(). This range must not be empty.
bool operator!=(const UsdPrimSubtreeIterator &other) const
Inequality.
USD_API std::vector< UsdRelationship > GetRelationships() const
Like GetProperties(), but exclude all attributes from the result.
UsdPrimSubtreeRange()=default
SubtreeRange GetFilteredDescendants(const Usd_PrimFlagsPredicate &predicate) const
USD_API UsdResolveTarget MakeResolveTargetUpToEditTarget(const UsdEditTarget &editTarget) const
USD_API const Usd_PrimFlagsConjunction UsdPrimDefaultPredicate
bool equal(const UsdPrimSubtreeRange &other) const
Equality compare.
iterator::value_type value_type
Iterator value_type.
USD_API const Usd_PrimFlagsPredicate UsdPrimAllPrimsPredicate
bool Usd_MoveToNextSiblingOrParent(PrimDataPtr &p, SdfPath &proxyPrimPath, PrimDataPtr end, const Usd_PrimFlagsPredicate &pred)
iterator::reference reference
Iterator reference_type.
const PcpPrimIndex & GetPrimIndex() const
USD_API std::vector< UsdProperty > GetAuthoredPropertiesInNamespace(const std::vector< std::string > &namespaces) const
USD_API TfTokenVector GetPropertyOrder() const
Return the strongest propertyOrder metadata value authored on this prim.
bool IsInstanceable() const
UsdPrimSubtreeIterator SubtreeIterator
Convenience typedefs.
USD_API UsdObject GetObjectAtPath(const SdfPath &path) const
USD_API std::vector< UsdRelationship > GetAuthoredRelationships() const
UsdPrimSubtreeIterator()=default
bool HasAPIInFamily(UsdSchemaRegistry::VersionPolicy versionPolicy) const
USD_API TfTokenVector GetChildrenNames() const
bool empty() const
Return begin() == end().
USD_API UsdSpecializes GetSpecializes() const
const_iterator cend() const
Past-the-end iterator.
const TfToken & GetTypeName() const
USD_API std::vector< std::pair< SdfPrimSpecHandle, SdfLayerOffset > > GetPrimStackWithLayerOffsets() const
#define PXR_NAMESPACE_CLOSE_SCOPE
USD_API TfTokenVector GetChildrenReorder() const
USD_API UsdRelationship GetRelationship(const TfToken &relName) const
std::ptrdiff_t difference_type
Iterator difference type.
USD_API UsdPrim GetChild(const TfToken &name) const
USD_API bool HasVariantSets() const
bool CanApplyAPI(const TfToken &instanceName, std::string *whyNot=nullptr) const
USD_API bool HasAPIInFamily(const TfToken &schemaFamily) const
OIIO_UTIL_API const char * c_str(string_view str)
USD_API std::vector< UsdAttribute > GetAttributes() const
Like GetProperties(), but exclude all relationships from the result.
const TfToken & GetTypeName() const
USD_API std::vector< UsdPrim > GetInstances() const
bool SetTypeName(const TfToken &typeName) const
Author this Prim's typeName at the current EditTarget.
bool SetSpecifier(SdfSpecifier specifier) const
USD_API UsdPrim GetFilteredNextSibling(const Usd_PrimFlagsPredicate &predicate) const
friend bool operator!=(const ForwardRange &lhs, const UsdPrimSubtreeRange &rhs)
Inequality comparison.
SIM_API const UT_StringHolder distance
USD_API bool GetVersionIfIsInFamily(const TfToken &schemaFamily, UsdSchemaVersion *schemaVersion) const
UsdPrimSiblingRange()=default
bool empty() const
Return begin() == end().
UsdPrimSubtreeRange & advance_begin(difference_type n)
Advance this range's begin iterator.
UsdPrim()
Construct an invalid prim.
UsdPrimSubtreeIterator & operator++()
Preincrement.
bool SetActive(bool active) const
USD_API UsdAttribute GetAttribute(const TfToken &attrName) const
bool HasDefiningSpecifier() const
USD_API bool GetKind(TfToken *kind) const
USD_API std::vector< UsdProperty > GetPropertiesInNamespace(const std::vector< std::string > &namespaces) const
UsdPrimSubtreeRange SubtreeRange
bool operator!=(const UsdPrimSiblingIterator &other) const
const_iterator cbegin() const
First iterator.
UsdSchemaVersion version
The version number of the schema within its schema family.
iterator::reference reference
Iterator reference_type.
USD_API bool HasPayload() const
UsdPrimSiblingIterator SiblingIterator
Convenience typedefs.
Multiple Apply API Schema.
iterator begin() const
First iterator.
std::ptrdiff_t difference_type
const UsdPrimTypeInfo & GetPrimTypeInfo() const
Returns the full type info for the prim.
Load a prim plus all its descendants.
USD_API bool SetKind(const TfToken &kind) const
bool IsInPrototype() const
SiblingRange GetFilteredChildren(const Usd_PrimFlagsPredicate &predicate) const
UsdPrimSiblingIterator()=default
friend const PcpPrimIndex & Usd_PrimGetSourcePrimIndex(const UsdPrim &)
std::forward_iterator_tag iterator_category
USD_API bool IsPseudoRoot() const
UsdPrimSubtreeRange(UsdPrimSubtreeIterator begin, UsdPrimSubtreeIterator end)
Construct with a pair of iterators.