24 #ifndef PXR_USD_USD_PRIM_H
25 #define PXR_USD_USD_PRIM_H
48 #include <type_traits>
158 return _Prim()->GetPrimTypeInfo();
165 return _Prim()->GetPrimDefinition();
200 std::vector<std::pair<SdfPrimSpecHandle, SdfLayerOffset>>
206 return SetMetadata(SdfFieldKeys->Specifier, specifier);
220 return SetMetadata(SdfFieldKeys->TypeName, typeName);
306 return _Prim()->HasDefiningSpecifier();
321 std::function<bool (const TfToken &propertyName)>;
431 std::vector<UsdProperty>
439 std::vector<UsdProperty>
448 std::vector<UsdProperty>
450 const std::vector<std::string> &namespaces)
const;
458 std::vector<UsdProperty>
546 bool _HasAPIInstance(
548 const TfToken &instanceName)
const;
551 bool _CanApplySingleApplyAPI(
556 bool _CanApplyMultipleApplyAPI(
562 bool _ApplySingleApplyAPI(
566 bool _ApplyMultipleApplyAPI(
568 const TfToken &instanceName)
const;
571 bool _RemoveSingleApplyAPI(
575 bool _RemoveMultipleApplyAPI(
577 const TfToken &instanceName)
const;
590 template <
typename SchemaType>
593 "Provided type must derive UsdSchemaBase.");
594 return _IsA(UsdSchemaRegistry::FindSchemaInfo<SchemaType>());
599 bool IsA(
const TfType& schemaType)
const;
604 bool IsA(
const TfToken& schemaIdentifier)
const;
636 template <
typename SchemaType>
640 "Provided type must derive UsdSchemaBase.");
642 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
645 "UsdSchemaRegistry as a schema type. The schema may need to be "
673 const TfToken &schemaIdentifier,
739 template <
typename SchemaType>
743 "Provided type must derive UsdAPISchemaBase.");
745 "Provided type must not be UsdAPISchemaBase.");
749 "Provided schema type must be an applied API schema.");
751 return _HasAPI(UsdSchemaRegistry::FindSchemaInfo<SchemaType>());
759 template <
typename SchemaType>
763 "Provided type must derive UsdAPISchemaBase.");
765 "Provided type must not be UsdAPISchemaBase.");
767 "Provided schema type must be a multi apply API schema.");
769 return _HasAPIInstance(
770 UsdSchemaRegistry::FindSchemaInfo<SchemaType>(), instanceName);
781 const TfToken& instanceName)
const;
793 const TfToken& instanceName)
const;
807 const TfToken& instanceName)
const;
823 const TfToken &schemaFamily)
const;
833 const TfToken &instanceName)
const;
860 const TfToken &instanceName)
const;
866 template <
typename SchemaType>
870 "Provided type must derive UsdSchemaBase.");
872 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
875 "UsdSchemaRegistry as a schema type. The schema may need to be "
888 template <
typename SchemaType>
891 const TfToken &instanceName)
const {
893 "Provided type must derive UsdSchemaBase.");
895 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
898 "UsdSchemaRegistry as a schema type. The schema may need to be "
904 versionPolicy, instanceName);
924 const TfToken &instanceName)
const;
936 const TfToken &schemaIdentifier,
949 const TfToken &schemaIdentifier,
951 const TfToken &instanceName)
const;
1009 template <
typename SchemaType>
1012 "Provided type must derive UsdAPISchemaBase.");
1014 "Provided type must not be UsdAPISchemaBase.");
1016 "Provided schema type must be a single apply API schema.");
1019 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1022 "UsdSchemaRegistry as a schema type. The schema may need to be "
1024 TfType::Find<SchemaType>().
GetTypeName().c_str());
1027 return _CanApplySingleApplyAPI(*schemaInfo, whyNot);
1043 template <
typename SchemaType>
1047 "Provided type must derive UsdAPISchemaBase.");
1049 "Provided type must not be UsdAPISchemaBase.");
1051 "Provided schema type must be a multiple apply API schema.");
1054 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1057 "UsdSchemaRegistry as a schema type. The schema may need to be "
1059 TfType::Find<SchemaType>().
GetTypeName().c_str());
1062 return _CanApplyMultipleApplyAPI(*schemaInfo, instanceName, whyNot);
1132 template <
typename SchemaType>
1135 "Provided type must derive UsdAPISchemaBase.");
1137 "Provided type must not be UsdAPISchemaBase.");
1139 "Provided schema type must be a single apply API schema.");
1142 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1145 "UsdSchemaRegistry as a schema type. The schema may need to be "
1147 TfType::Find<SchemaType>().
GetTypeName().c_str());
1150 return _ApplySingleApplyAPI(*schemaInfo);
1173 template <
typename SchemaType>
1176 "Provided type must derive UsdAPISchemaBase.");
1178 "Provided type must not be UsdAPISchemaBase.");
1180 "Provided schema type must be a multiple apply API schema.");
1183 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1186 "UsdSchemaRegistry as a schema type. The schema may need to be "
1188 TfType::Find<SchemaType>().
GetTypeName().c_str());
1191 return _ApplyMultipleApplyAPI(*schemaInfo, instanceName);
1202 const TfToken& instanceName)
const;
1214 const TfToken& instanceName)
const;
1228 const TfToken& instanceName)
const;
1252 template <
typename SchemaType>
1255 "Provided type must derive UsdAPISchemaBase.");
1257 "Provided type must not be UsdAPISchemaBase.");
1259 "Provided schema type must be a single apply API schema.");
1262 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1265 "UsdSchemaRegistry as a schema type. The schema may need to be "
1267 TfType::Find<SchemaType>().
GetTypeName().c_str());
1270 return _RemoveSingleApplyAPI(*schemaInfo);
1294 template <
typename SchemaType>
1297 "Provided type must derive UsdAPISchemaBase.");
1299 "Provided type must not be UsdAPISchemaBase.");
1301 "Provided schema type must be a multiple apply API schema.");
1304 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1307 "UsdSchemaRegistry as a schema type. The schema may need to be "
1309 TfType::Find<SchemaType>().
GetTypeName().c_str());
1312 return _RemoveMultipleApplyAPI(*schemaInfo, instanceName);
1323 const TfToken& instanceName)
const;
1335 const TfToken& instanceName)
const;
1349 const TfToken& instanceName)
const;
1550 return UsdPrim(prim, proxyPrimPath);
1715 const std::vector<std::string> &nameElts,
1724 const std::vector<std::string> &nameElts,
1767 std::function<
bool (
UsdAttribute const &)>
const &pred =
nullptr,
1768 bool recurseOnSources =
false)
const;
1776 std::function<
bool (
UsdAttribute const &)>
const &pred =
nullptr,
1777 bool recurseOnSources =
false)
const;
1821 bool custom=
true)
const;
1872 bool recurseOnTargets =
false)
const;
1881 bool recurseOnTargets =
false)
const;
2030 bool instanceable =
false;
2031 return GetMetadata(SdfFieldKeys->Instanceable, &instanceable) &&
2038 return SetMetadata(SdfFieldKeys->Instanceable, instanceable);
2200 class _ProtoToInstancePathMap {
2203 using _Map = std::vector<std::pair<SdfPath, SdfPath>>;
2226 :
UsdObject(primData, proxyPrimPath) { }
2233 :
UsdObject(objType, prim, proxyPrimPath, propName) {}
2244 std::vector<UsdProperty>
2250 bool applyOrder=
true,
2254 std::vector<UsdProperty>
2255 _GetPropertiesInNamespace(
const std::string &namespaces,
2256 bool onlyAuthored)
const;
2259 std::vector<UsdAttribute>
2260 _GetAttributes(
bool onlyAuthored,
bool applyOrder=
false)
const;
2263 std::vector<UsdRelationship>
2264 _GetRelationships(
bool onlyAuthored,
bool applyOrder=
false)
const;
2277 {
return _Prim()->GetSourcePrimIndex(); }
2282 _MakeResolveTargetFromEditTarget(
2284 bool makeAsStrongerThan)
const;
2286 _ProtoToInstancePathMap _GetProtoToInstancePathMap()
const;
2299 explicit _PtrProxy(
const UsdPrim& prim) : _prim(prim) {}
2332 return equal(other);
2336 return !equal(other);
2346 : _underlyingIterator(i)
2347 , _proxyPrimPath(proxyPrimPath)
2348 , _predicate(predicate) {
2350 if (_underlyingIterator &&
2351 !Usd_EvalPredicate(_predicate, _underlyingIterator,
2357 return _underlyingIterator == other._underlyingIterator &&
2358 _proxyPrimPath == other._proxyPrimPath &&
2359 _predicate == other._predicate;
2365 _underlyingIterator =
nullptr;
2371 return UsdPrim(_underlyingIterator, _proxyPrimPath);
2374 _UnderlyingIterator _underlyingIterator =
nullptr;
2416 explicit operator bool()
const {
return !
empty(); }
2420 return _begin == other._begin && _end == other._end;
2431 std::advance(_begin, n);
2437 std::advance(_end, n);
2448 return lhs.
equal(rhs);
2452 template <
class ForwardRange>
2454 const ForwardRange& rhs) {
2456 std::is_same<
typename decltype(std::cbegin(rhs))::iterator_category,
2457 std::forward_iterator_tag>::
value,
2458 "rhs must be a forward iterator."
2462 std::equal(std::cbegin(lhs), std::cend(lhs), std::cbegin(rhs));
2466 template <
class ForwardRange>
2475 return !lhs.
equal(rhs);
2479 template <
class ForwardRange>
2482 return !(lhs == rhs);
2486 template <
class ForwardRange>
2488 const ForwardRange& rhs) {
2489 return !(lhs == rhs);
2507 return _MakeSiblingRange(
2529 firstChild =
nullptr;
2548 explicit _PtrProxy(
const UsdPrim& prim) : _prim(prim) {}
2581 return equal(other);
2586 return !equal(other);
2597 : _underlyingIterator(i)
2598 , _proxyPrimPath(proxyPrimPath)
2599 , _predicate(predicate) {
2601 if (_underlyingIterator &&
2602 !Usd_EvalPredicate(_predicate, _underlyingIterator,
2605 _proxyPrimPath, _predicate)) {
2606 _underlyingIterator =
nullptr;
2613 return _underlyingIterator == other._underlyingIterator &&
2614 _proxyPrimPath == other._proxyPrimPath &&
2615 _predicate == other._predicate;
2628 return UsdPrim(_underlyingIterator, _proxyPrimPath);
2631 _UnderlyingIterator _underlyingIterator =
nullptr;
2673 explicit operator bool()
const {
2679 return _begin == other._begin && _end == other._end;
2690 std::advance(_begin, n);
2696 std::advance(_end, n);
2707 return lhs.
equal(rhs);
2711 template <
class ForwardRange>
2713 const ForwardRange& rhs) {
2715 std::is_convertible<
2716 typename decltype(std::cbegin(rhs))::iterator_category,
2717 std::forward_iterator_tag>::
value,
2718 "rhs must be a forward iterator."
2722 std::equal(std::cbegin(lhs), std::cend(lhs), std::cbegin(rhs));
2726 template <
class ForwardRange>
2735 return !lhs.
equal(rhs);
2739 template <
class ForwardRange>
2742 return !(lhs == rhs);
2746 template <
class ForwardRange>
2748 const ForwardRange& rhs) {
2749 return !(lhs == rhs);
2767 return _MakeDescendantsRange(
2789 SdfPath endChildPath = firstChildPath;
2806 return UsdPrim(_prim, _proxyPrimPath);
2811 #endif // PXR_USD_USD_PRIM_H
UsdPrimSubtreeIterator iterator
Iterator type.
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.
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)
hboost::math::policies::policy< hboost::math::policies::domain_error< hboost::math::policies::ignore_error >, hboost::math::policies::pole_error< hboost::math::policies::ignore_error >, hboost::math::policies::overflow_error< hboost::math::policies::ignore_error >, hboost::math::policies::underflow_error< hboost::math::policies::ignore_error >, hboost::math::policies::denorm_error< hboost::math::policies::ignore_error >, hboost::math::policies::rounding_error< hboost::math::policies::ignore_error >, hboost::math::policies::evaluation_error< hboost::math::policies::ignore_error >, hboost::math::policies::indeterminate_result_error< hboost::math::policies::ignore_error > > policy
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.
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
GLsizei const GLchar *const * string
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 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.
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
bool SetMetadata(const TfToken &key, const T &value) const
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
friend class Usd_StageImplAccess
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
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
reference operator*() const
Dereference.
USD_API bool HasAttribute(const TfToken &attrName) const
USD_API bool HasRelationship(const TfToken &relName) const
USD_API void Unload() const
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
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.
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.
friend bool operator==(const ForwardRange &lhs, const UsdPrimSiblingRange &rhs)
Equality comparison.
GLuint const GLchar * name
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
USD_API TfTokenVector GetAppliedSchemas() const
void SetChildrenReorder(const TfTokenVector &order) const
UsdPrim GetParent() const
USD_API UsdPayloads GetPayloads() const
bool ClearTypeName() const
std::vector< class SdfPath > SdfPathVector
A vector of SdfPaths.
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
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
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.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
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
USD_API std::vector< UsdAttribute > GetAttributes() const
Like GetProperties(), but exclude all relationships from the result.
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
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.