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);
304 std::function<bool (const TfToken &propertyName)>;
414 std::vector<UsdProperty>
422 std::vector<UsdProperty>
431 std::vector<UsdProperty>
433 const std::vector<std::string> &namespaces)
const;
441 std::vector<UsdProperty>
529 bool _HasAPIInstance(
531 const TfToken &instanceName)
const;
534 bool _CanApplySingleApplyAPI(
536 std::string *whyNot)
const;
539 bool _CanApplyMultipleApplyAPI(
542 std::string *whyNot)
const;
545 bool _ApplySingleApplyAPI(
549 bool _ApplyMultipleApplyAPI(
551 const TfToken &instanceName)
const;
554 bool _RemoveSingleApplyAPI(
558 bool _RemoveMultipleApplyAPI(
560 const TfToken &instanceName)
const;
573 template <
typename SchemaType>
576 "Provided type must derive UsdSchemaBase.");
577 return _IsA(UsdSchemaRegistry::FindSchemaInfo<SchemaType>());
582 bool IsA(
const TfType& schemaType)
const;
587 bool IsA(
const TfToken& schemaIdentifier)
const;
619 template <
typename SchemaType>
623 "Provided type must derive UsdSchemaBase.");
625 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
628 "UsdSchemaRegistry as a schema type. The schema may need to be "
656 const TfToken &schemaIdentifier,
722 template <
typename SchemaType>
726 "Provided type must derive UsdAPISchemaBase.");
728 "Provided type must not be UsdAPISchemaBase.");
732 "Provided schema type must be an applied API schema.");
734 return _HasAPI(UsdSchemaRegistry::FindSchemaInfo<SchemaType>());
742 template <
typename SchemaType>
746 "Provided type must derive UsdAPISchemaBase.");
748 "Provided type must not be UsdAPISchemaBase.");
750 "Provided schema type must be a multi apply API schema.");
752 return _HasAPIInstance(
753 UsdSchemaRegistry::FindSchemaInfo<SchemaType>(), instanceName);
764 const TfToken& instanceName)
const;
776 const TfToken& instanceName)
const;
790 const TfToken& instanceName)
const;
806 const TfToken &schemaFamily)
const;
816 const TfToken &instanceName)
const;
843 const TfToken &instanceName)
const;
849 template <
typename SchemaType>
853 "Provided type must derive UsdSchemaBase.");
855 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
858 "UsdSchemaRegistry as a schema type. The schema may need to be "
871 template <
typename SchemaType>
874 const TfToken &instanceName)
const {
876 "Provided type must derive UsdSchemaBase.");
878 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
881 "UsdSchemaRegistry as a schema type. The schema may need to be "
887 versionPolicy, instanceName);
907 const TfToken &instanceName)
const;
919 const TfToken &schemaIdentifier,
932 const TfToken &schemaIdentifier,
934 const TfToken &instanceName)
const;
992 template <
typename SchemaType>
995 "Provided type must derive UsdAPISchemaBase.");
997 "Provided type must not be UsdAPISchemaBase.");
999 "Provided schema type must be a single apply API schema.");
1002 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1005 "UsdSchemaRegistry as a schema type. The schema may need to be "
1010 return _CanApplySingleApplyAPI(*schemaInfo, whyNot);
1026 template <
typename SchemaType>
1028 std::string *whyNot =
nullptr)
const {
1030 "Provided type must derive UsdAPISchemaBase.");
1032 "Provided type must not be UsdAPISchemaBase.");
1034 "Provided schema type must be a multiple apply API schema.");
1037 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1040 "UsdSchemaRegistry as a schema type. The schema may need to be "
1045 return _CanApplyMultipleApplyAPI(*schemaInfo, instanceName, whyNot);
1052 std::string *whyNot =
nullptr)
const;
1060 std::string *whyNot =
nullptr)
const;
1066 std::string *whyNot =
nullptr)
const;
1075 std::string *whyNot =
nullptr)
const;
1082 std::string *whyNot =
nullptr)
const;
1092 std::string *whyNot =
nullptr)
const;
1115 template <
typename SchemaType>
1118 "Provided type must derive UsdAPISchemaBase.");
1120 "Provided type must not be UsdAPISchemaBase.");
1122 "Provided schema type must be a single apply API schema.");
1125 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1128 "UsdSchemaRegistry as a schema type. The schema may need to be "
1133 return _ApplySingleApplyAPI(*schemaInfo);
1156 template <
typename SchemaType>
1159 "Provided type must derive UsdAPISchemaBase.");
1161 "Provided type must not be UsdAPISchemaBase.");
1163 "Provided schema type must be a multiple apply API schema.");
1166 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1169 "UsdSchemaRegistry as a schema type. The schema may need to be "
1174 return _ApplyMultipleApplyAPI(*schemaInfo, instanceName);
1185 const TfToken& instanceName)
const;
1197 const TfToken& instanceName)
const;
1211 const TfToken& instanceName)
const;
1235 template <
typename SchemaType>
1238 "Provided type must derive UsdAPISchemaBase.");
1240 "Provided type must not be UsdAPISchemaBase.");
1242 "Provided schema type must be a single apply API schema.");
1245 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1248 "UsdSchemaRegistry as a schema type. The schema may need to be "
1253 return _RemoveSingleApplyAPI(*schemaInfo);
1277 template <
typename SchemaType>
1280 "Provided type must derive UsdAPISchemaBase.");
1282 "Provided type must not be UsdAPISchemaBase.");
1284 "Provided schema type must be a multiple apply API schema.");
1287 UsdSchemaRegistry::FindSchemaInfo<SchemaType>();
1290 "UsdSchemaRegistry as a schema type. The schema may need to be "
1295 return _RemoveMultipleApplyAPI(*schemaInfo, instanceName);
1306 const TfToken& instanceName)
const;
1318 const TfToken& instanceName)
const;
1332 const TfToken& instanceName)
const;
1533 return UsdPrim(prim, proxyPrimPath);
1698 const std::vector<std::string> &nameElts,
1707 const std::vector<std::string> &nameElts,
1750 std::function<
bool (
UsdAttribute const &)>
const &pred =
nullptr,
1751 bool recurseOnSources =
false)
const;
1759 std::function<
bool (
UsdAttribute const &)>
const &pred =
nullptr,
1760 bool recurseOnSources =
false)
const;
1804 bool custom=
true)
const;
1855 bool recurseOnTargets =
false)
const;
1864 bool recurseOnTargets =
false)
const;
1900 const std::string& assetPath,
const SdfPath& primPath)
const;
2013 bool instanceable =
false;
2014 return GetMetadata(SdfFieldKeys->Instanceable, &instanceable) &&
2021 return SetMetadata(SdfFieldKeys->Instanceable, instanceable);
2183 class _ProtoToInstancePathMap {
2186 using _Map = std::vector<std::pair<SdfPath, SdfPath>>;
2209 :
UsdObject(primData, proxyPrimPath) { }
2216 :
UsdObject(objType, prim, proxyPrimPath, propName) {}
2227 std::vector<UsdProperty>
2233 bool applyOrder=
true,
2237 std::vector<UsdProperty>
2238 _GetPropertiesInNamespace(
const std::string &namespaces,
2239 bool onlyAuthored)
const;
2242 std::vector<UsdAttribute>
2243 _GetAttributes(
bool onlyAuthored,
bool applyOrder=
false)
const;
2246 std::vector<UsdRelationship>
2247 _GetRelationships(
bool onlyAuthored,
bool applyOrder=
false)
const;
2265 _MakeResolveTargetFromEditTarget(
2267 bool makeAsStrongerThan)
const;
2269 _ProtoToInstancePathMap _GetProtoToInstancePathMap()
const;
2282 explicit _PtrProxy(
const UsdPrim& prim) : _prim(prim) {}
2315 return equal(other);
2319 return !equal(other);
2329 : _underlyingIterator(i)
2330 , _proxyPrimPath(proxyPrimPath)
2331 , _predicate(predicate) {
2333 if (_underlyingIterator &&
2334 !Usd_EvalPredicate(_predicate, _underlyingIterator,
2340 return _underlyingIterator == other._underlyingIterator &&
2341 _proxyPrimPath == other._proxyPrimPath &&
2342 _predicate == other._predicate;
2348 _underlyingIterator =
nullptr;
2354 return UsdPrim(_underlyingIterator, _proxyPrimPath);
2357 _UnderlyingIterator _underlyingIterator =
nullptr;
2403 return _begin == other._begin && _end == other._end;
2414 std::advance(_begin, n);
2420 std::advance(_end, n);
2431 return lhs.
equal(rhs);
2435 template <
class ForwardRange>
2437 const ForwardRange& rhs) {
2439 std::is_same<
typename decltype(std::cbegin(rhs))::iterator_category,
2440 std::forward_iterator_tag>::
value,
2441 "rhs must be a forward iterator."
2445 std::equal(std::cbegin(lhs), std::cend(lhs), std::cbegin(rhs));
2449 template <
class ForwardRange>
2458 return !lhs.
equal(rhs);
2462 template <
class ForwardRange>
2465 return !(lhs == rhs);
2469 template <
class ForwardRange>
2471 const ForwardRange& rhs) {
2472 return !(lhs == rhs);
2490 return _MakeSiblingRange(
2512 firstChild =
nullptr;
2531 explicit _PtrProxy(
const UsdPrim& prim) : _prim(prim) {}
2564 return equal(other);
2569 return !equal(other);
2580 : _underlyingIterator(i)
2581 , _proxyPrimPath(proxyPrimPath)
2582 , _predicate(predicate) {
2584 if (_underlyingIterator &&
2585 !Usd_EvalPredicate(_predicate, _underlyingIterator,
2588 _proxyPrimPath, _predicate)) {
2589 _underlyingIterator =
nullptr;
2596 return _underlyingIterator == other._underlyingIterator &&
2597 _proxyPrimPath == other._proxyPrimPath &&
2598 _predicate == other._predicate;
2611 return UsdPrim(_underlyingIterator, _proxyPrimPath);
2614 _UnderlyingIterator _underlyingIterator =
nullptr;
2662 return _begin == other._begin && _end == other._end;
2673 std::advance(_begin, n);
2679 std::advance(_end, n);
2690 return lhs.
equal(rhs);
2694 template <
class ForwardRange>
2696 const ForwardRange& rhs) {
2698 std::is_convertible<
2699 typename decltype(std::cbegin(rhs))::iterator_category,
2700 std::forward_iterator_tag>::
value,
2701 "rhs must be a forward iterator."
2705 std::equal(std::cbegin(lhs), std::cend(lhs), std::cbegin(rhs));
2709 template <
class ForwardRange>
2718 return !lhs.
equal(rhs);
2722 template <
class ForwardRange>
2725 return !(lhs == rhs);
2729 template <
class ForwardRange>
2731 const ForwardRange& rhs) {
2732 return !(lhs == rhs);
2750 return _MakeDescendantsRange(
2772 SdfPath endChildPath = firstChildPath;
2789 return UsdPrim(_prim, _proxyPrimPath);
2794 #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)
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 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.
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
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.
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
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 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
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.
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
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.