object.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_USD_USD_OBJECT_H
25 #define PXR_USD_USD_OBJECT_H
26 
28 
29 #include "pxr/pxr.h"
30 #include "pxr/usd/usd/api.h"
31 #include "pxr/usd/usd/common.h"
32 #include "pxr/usd/usd/primData.h"
33 #include "pxr/usd/usd/stage.h"
34 
35 #include "pxr/usd/sdf/abstractData.h"
36 #include "pxr/usd/sdf/path.h"
37 
38 #include "pxr/base/tf/hash.h"
39 
40 #include <type_traits>
41 
42 PXR_NAMESPACE_OPEN_SCOPE
43 
44 
46 
52 {
53  // Value order matters in this enum.
54  UsdTypeObject,
55  UsdTypePrim,
56  UsdTypeProperty,
57  UsdTypeAttribute,
58  UsdTypeRelationship,
59 
60  Usd_NumObjTypes
61 };
62 
63 
64 namespace _Detail {
65 
66 // A metafunction that takes a UsdObject class like UsdObject, UsdPrim,
67 // UsdProperty, etc, and gives its corresponding UsdObjType, e.g. UsdTypeObject,
68 // UsdTypePrim, UsdTypeProperty, etc. Usage: GetObjType<UsdPrim>::Value.
69 template <UsdObjType Type>
70 struct Const { static const UsdObjType Value = Type; };
71 template <class T> struct GetObjType {
72  static_assert(std::is_base_of<UsdObject, T>::value,
73  "Type T must be a subclass of UsdObject.");
74 };
75 template <> struct GetObjType<UsdObject> : Const<UsdTypeObject> {};
76 template <> struct GetObjType<UsdPrim> : Const<UsdTypePrim> {};
77 template <> struct GetObjType<UsdProperty> : Const<UsdTypeProperty> {};
78 template <> struct GetObjType<UsdAttribute> : Const<UsdTypeAttribute> {};
79 template <> struct GetObjType<UsdRelationship> : Const<UsdTypeRelationship> {};
80 
81 } // _Detail
82 
85 inline bool
86 UsdIsSubtype(UsdObjType baseType, UsdObjType subType) {
87  return (baseType == UsdTypeObject) || (baseType == subType) ||
88  (baseType == UsdTypeProperty && subType > UsdTypeProperty);
89 }
90 
93 inline bool
95  return UsdIsSubtype(to, from);
96 }
97 
100 inline bool
102  return type == UsdTypePrim ||
103  type == UsdTypeAttribute ||
104  type == UsdTypeRelationship;
105 }
106 
132 class UsdObject {
133 public:
135  UsdObject() : _type(UsdTypeObject) {}
136 
137  // --------------------------------------------------------------------- //
140  // --------------------------------------------------------------------- //
141 
143  bool IsValid() const {
144  if (!UsdIsConcrete(_type) || !_prim)
145  return false;
146  if (_type == UsdTypePrim)
147  return true;
148  SdfSpecType specType = _GetDefiningSpecType();
149  return (_type == UsdTypeAttribute &&
150  specType == SdfSpecTypeAttribute) ||
151  (_type == UsdTypeRelationship &&
152  specType == SdfSpecTypeRelationship);
153  }
154 
156  explicit operator bool() const {
157  return IsValid();
158  }
159 
160 public:
161 
164  friend bool operator==(const UsdObject &lhs, const UsdObject &rhs) {
165  return lhs._type == rhs._type &&
166  lhs._prim == rhs._prim &&
167  lhs._proxyPrimPath == rhs._proxyPrimPath &&
168  lhs._propName == rhs._propName;
169  }
170 
173  friend bool operator!=(const UsdObject &lhs, const UsdObject &rhs) {
174  return !(lhs == rhs);
175  }
176 
180  friend bool operator<(const UsdObject &lhs, const UsdObject &rhs) {
181  return lhs.GetPath() < rhs.GetPath();
182  }
183 
184  // hash_value overload for std/boost hash.
185  friend size_t hash_value(const UsdObject &obj) {
186  return TfHash()(obj);
187  }
188 
189  // TfHash support
190  template <class HashState>
191  friend void TfHashAppend(HashState &h, const UsdObject &obj) {
192  h.Append(obj._type, obj._prim, obj._proxyPrimPath, obj._propName);
193  }
194 
197  USD_API
198  UsdStageWeakPtr GetStage() const;
199 
203  SdfPath GetPath() const {
204  // Allow getting expired object paths.
205  if (!_proxyPrimPath.IsEmpty()) {
206  return _type == UsdTypePrim ?
207  _proxyPrimPath : _proxyPrimPath.AppendProperty(_propName);
208  }
209  else if (Usd_PrimDataConstPtr p = get_pointer(_prim)) {
210  return _type == UsdTypePrim ?
211  p->GetPath() : p->GetPath().AppendProperty(_propName);
212  }
213  return SdfPath();
214  }
215 
218  const SdfPath &GetPrimPath() const {
219  // Allow getting expired object paths.
220  if (!_proxyPrimPath.IsEmpty()) {
221  return _proxyPrimPath;
222  }
223  else if (Usd_PrimDataConstPtr p = get_pointer(_prim)) {
224  return p->GetPath();
225  }
226  return SdfPath::EmptyPath();
227  }
228 
231  inline UsdPrim GetPrim() const;
232 
238  const TfToken &GetName() const {
239  return _type == UsdTypePrim ? GetPrimPath().GetNameToken() : _propName;
240  }
241 
245  template <class T>
246  T As() const {
247  // compile-time type assertion provided by invoking Is<T>().
248  return Is<T>() ? T(_type, _prim, _proxyPrimPath, _propName) : T();
249  }
250 
256  template <class T>
257  bool Is() const {
258  static_assert(std::is_base_of<UsdObject, T>::value,
259  "Provided type T must derive from or be UsdObject");
260  return UsdIsConvertible(_type, _Detail::GetObjType<T>::Value);
261  }
262 
268  USD_API
269  std::string GetDescription() const;
270 
271  // --------------------------------------------------------------------- //
273  // --------------------------------------------------------------------- //
274 
275 
276  // --------------------------------------------------------------------- //
279  // --------------------------------------------------------------------- //
280 
295  template<typename T>
296  bool GetMetadata(const TfToken& key, T* value) const;
300  USD_API
301  bool GetMetadata(const TfToken& key, VtValue* value) const;
302 
309  template<typename T>
310  bool SetMetadata(const TfToken& key, const T& value) const;
312  USD_API
313  bool SetMetadata(const TfToken& key, const VtValue& value) const;
314 
324  USD_API
325  bool ClearMetadata(const TfToken& key) const;
326 
330  USD_API
331  bool HasMetadata(const TfToken& key) const;
332 
336  USD_API
337  bool HasAuthoredMetadata(const TfToken& key) const;
338 
354  template <class T>
356  const TfToken& key, const TfToken &keyPath, T *value) const;
358  USD_API
360  const TfToken& key, const TfToken &keyPath, VtValue *value) const;
361 
369  template<typename T>
371  const TfToken& key, const TfToken &keyPath, const T& value) const;
373  USD_API
375  const TfToken& key, const TfToken &keyPath, const VtValue& value) const;
376 
384  USD_API
386  const TfToken& key, const TfToken& keyPath) const;
387 
394  USD_API
395  bool HasMetadataDictKey(
396  const TfToken& key, const TfToken &keyPath) const;
397 
404  USD_API
406  const TfToken& key, const TfToken &keyPath) const;
407 
414  USD_API
415  UsdMetadataValueMap GetAllMetadata() const;
416 
423  USD_API
424  UsdMetadataValueMap GetAllAuthoredMetadata() const;
425 
426  // --------------------------------------------------------------------- //
428  // --------------------------------------------------------------------- //
429 
430  // --------------------------------------------------------------------- //
433  // --------------------------------------------------------------------- //
434 
449  USD_API
450  bool IsHidden() const;
451 
454  USD_API
455  bool SetHidden(bool hidden) const;
456 
458  USD_API
459  bool ClearHidden() const;
460 
466  USD_API
467  bool HasAuthoredHidden() const;
468 
487  USD_API
488  VtDictionary GetCustomData() const;
489 
495  USD_API
496  VtValue GetCustomDataByKey(const TfToken &keyPath) const;
497 
500  USD_API
501  void SetCustomData(const VtDictionary &customData) const;
502 
506  USD_API
507  void SetCustomDataByKey(const TfToken &keyPath, const VtValue &value) const;
508 
512  USD_API
513  void ClearCustomData() const;
514 
519  USD_API
520  void ClearCustomDataByKey(const TfToken &keyPath) const;
521 
524  USD_API
525  bool HasCustomData() const;
526 
531  USD_API
532  bool HasCustomDataKey(const TfToken &keyPath) const;
533 
536  USD_API
537  bool HasAuthoredCustomData() const;
538 
543  USD_API
544  bool HasAuthoredCustomDataKey(const TfToken &keyPath) const;
545 
559  USD_API
560  VtDictionary GetAssetInfo() const;
561 
567  USD_API
568  VtValue GetAssetInfoByKey(const TfToken &keyPath) const;
569 
572  USD_API
573  void SetAssetInfo(const VtDictionary &customData) const;
574 
578  USD_API
579  void SetAssetInfoByKey(const TfToken &keyPath, const VtValue &value) const;
580 
584  USD_API
585  void ClearAssetInfo() const;
586 
591  USD_API
592  void ClearAssetInfoByKey(const TfToken &keyPath) const;
593 
596  USD_API
597  bool HasAssetInfo() const;
598 
603  USD_API
604  bool HasAssetInfoKey(const TfToken &keyPath) const;
605 
608  USD_API
609  bool HasAuthoredAssetInfo() const;
610 
615  USD_API
616  bool HasAuthoredAssetInfoKey(const TfToken &keyPath) const;
617 
621  USD_API
622  std::string GetDocumentation() const;
623 
625  USD_API
626  bool SetDocumentation(const std::string& doc) const;
627 
630  USD_API
631  bool ClearDocumentation() const;
632 
635  USD_API
636  bool HasAuthoredDocumentation() const;
637 
641  USD_API
642  std::string GetDisplayName() const;
643 
649  USD_API
650  bool SetDisplayName(const std::string& name) const;
651 
654  USD_API
655  bool ClearDisplayName() const;
656 
659  USD_API
660  bool HasAuthoredDisplayName() const;
661 
662  // --------------------------------------------------------------------- //
664  // --------------------------------------------------------------------- //
665 
666  // XXX: This method can and probably should move to UsdProperty
667  static char GetNamespaceDelimiter()
668  { return SdfPathTokens->namespaceDelimiter.GetText()[0]; }
669 
670 private:
671  template <class T>
672  bool _GetMetadataImpl(const TfToken& key,
673  T* value,
674  const TfToken &keyPath=TfToken()) const;
675 
676  bool _GetMetadataImpl(const TfToken& key,
677  VtValue* value,
678  const TfToken &keyPath=TfToken()) const;
679 
680  template <class T>
681  bool _SetMetadataImpl(const TfToken& key,
682  const T& value,
683  const TfToken &keyPath=TfToken()) const;
684 
685  bool _SetMetadataImpl(const TfToken& key,
686  const VtValue& value,
687  const TfToken &keyPath=TfToken()) const;
688 
689 protected:
690  template <class Derived> struct _Null {};
691 
692  // Private constructor for null dervied types.
693  template <class Derived>
694  explicit UsdObject(_Null<Derived>)
695  : _type(_Detail::GetObjType<Derived>::Value) {}
696 
697  // Private constructor for UsdPrim.
698  UsdObject(const Usd_PrimDataHandle &prim,
699  const SdfPath &proxyPrimPath)
700  : _type(UsdTypePrim)
701  , _prim(prim)
702  , _proxyPrimPath(proxyPrimPath)
703  {
704  TF_VERIFY(!_prim || _prim->GetPath() != _proxyPrimPath);
705  }
706 
707  // Private constructor for UsdAttribute/UsdRelationship.
708  UsdObject(UsdObjType objType,
709  const Usd_PrimDataHandle &prim,
710  const SdfPath &proxyPrimPath,
711  const TfToken &propName)
712  : _type(objType)
713  , _prim(prim)
714  , _proxyPrimPath(proxyPrimPath)
715  , _propName(propName)
716  {
717  TF_VERIFY(!_prim || _prim->GetPath() != _proxyPrimPath);
718  }
719 
720  // Return the stage this object belongs to.
721  UsdStage *_GetStage() const { return _prim->GetStage(); }
722 
723  // Return this object's defining spec type.
724  USD_API
725  SdfSpecType _GetDefiningSpecType() const;
726 
727  // Helper for subclasses: return held prim data.
728  const Usd_PrimDataHandle &_Prim() const { return _prim; }
729 
730  // Helper for subclasses: return held property name.
731  const TfToken &_PropName() const { return _propName; }
732 
733  // Helper for subclasses: return held proxy prim path.
734  const SdfPath &_ProxyPrimPath() const { return _proxyPrimPath; }
735 
736 private:
737  // Helper for the above helper, and also for GetDescription()
738  std::string _GetObjectDescription(const std::string &preface) const;
739 
740  friend class UsdStage;
741 
742  friend UsdObjType Usd_GetObjType(const UsdObject &obj) {
743  return obj._type;
744  }
745 
746  UsdObjType _type;
747  Usd_PrimDataHandle _prim;
748  SdfPath _proxyPrimPath;
749  TfToken _propName;
750 
751 };
752 
753 template<typename T>
754 inline
755 bool
756 UsdObject::GetMetadata(const TfToken& key, T* value) const
757 {
758  return _GetMetadataImpl(key, value);
759 }
760 
761 template<typename T>
762 inline
763 bool
764 UsdObject::SetMetadata(const TfToken& key, const T& value) const
765 {
766  return _SetMetadataImpl(key, value);
767 }
768 
769 template <typename T>
770 inline
771 bool
773  const TfToken &keyPath,
774  T *value) const
775 {
776  return _GetMetadataImpl(key, value, keyPath);
777 }
778 
779 template <typename T>
780 inline
781 bool
783  const TfToken &keyPath,
784  const T& value) const
785 {
786  return _SetMetadataImpl(key, value, keyPath);
787 }
788 
789 template <class T>
790 bool
791 UsdObject::_GetMetadataImpl(const TfToken& key,
792  T* value,
793  const TfToken &keyPath) const
794 {
795  return _GetStage()->_GetMetadata(
796  *this, key, keyPath, /*useFallbacks=*/true, value);
797 }
798 
799 template <class T>
800 bool
801 UsdObject::_SetMetadataImpl(const TfToken& key,
802  const T& value,
803  const TfToken &keyPath) const
804 {
805  return _GetStage()->_SetMetadata(*this, key, keyPath, value);
806 }
807 
808 PXR_NAMESPACE_CLOSE_SCOPE
809 
810 #endif //PXR_USD_USD_OBJECT_H
USD_API void ClearCustomDataByKey(const TfToken &keyPath) const
Clear the authored opinion identified by keyPath in this object's customData dictionary at the curren...
bool SetMetadata(const TfToken &key, const T &value) const
Set metadatum key's value to value.
Definition: object.h:764
T As() const
Convert this UsdObject to another object type T if possible.
Definition: object.h:246
UsdObjType
Enum values to represent the various Usd object types.
Definition: object.h:51
USD_API bool SetDocumentation(const std::string &doc) const
Sets this object's documentation (metadata). Returns true on success.
#define TF_DECLARE_WEAK_PTRS(type)
Define standard weak pointer types.
Definition: declarePtrs.h:62
USD_API bool ClearHidden() const
Clears the opinion for "Hidden" at the current EditTarget.
USD_API bool HasCustomData() const
Return true if there are any authored or fallback opinions for this object's customData dictionary,...
USD_API UsdStageWeakPtr GetStage() const
Return the stage that owns the object, and to whose state and lifetime this object's validity is tied...
USD_API bool SetDisplayName(const std::string &name) const
Sets this object's display name (metadata).
USD_API bool HasCustomDataKey(const TfToken &keyPath) const
Return true if there are any authored or fallback opinions for the element identified by keyPath in t...
bool UsdIsSubtype(UsdObjType baseType, UsdObjType subType)
Return true if subType is the same as or a subtype of baseType, false otherwise.
Definition: object.h:86
A map with string keys and VtValue values.
Definition: dictionary.h:62
USD_API std::string GetDisplayName() const
Return this object's display name (metadata).
USD_API bool SetHidden(bool hidden) const
Sets the value of the 'hidden' metadata field.
friend bool operator<(const UsdObject &lhs, const UsdObject &rhs)
Less-than operator.
Definition: object.h:180
USD_API bool ClearDocumentation() const
Clears this object's documentation (metadata) in the current EditTarget (only).
The outermost container for scene description, which owns and presents composed prims as a scenegraph...
Definition: stage.h:147
USD_API bool HasAuthoredCustomData() const
Return true if there are any authored opinions (excluding fallback) for this object's customData dict...
USD_API bool HasAuthoredMetadataDictKey(const TfToken &key, const TfToken &keyPath) const
Return true if there exists any authored opinion (excluding fallbacks) for key and keyPath.
bool SetMetadataByDictKey(const TfToken &key, const TfToken &keyPath, const T &value) const
Author value to the field identified by key and keyPath at the current EditTarget.
Definition: object.h:782
USD_API void SetAssetInfo(const VtDictionary &customData) const
Author this object's assetInfo dictionary to assetInfo at the current EditTarget.
Scenegraph object for authoring and retrieving numeric, string, and array valued data,...
Definition: attribute.h:176
USD_API void SetCustomDataByKey(const TfToken &keyPath, const VtValue &value) const
Author the element identified by keyPath in this object's customData dictionary at the current EditTa...
USD_API bool HasAssetInfoKey(const TfToken &keyPath) const
Return true if there are any authored or fallback opinions for the element identified by keyPath in t...
A user-extensible hashing mechanism for use with runtime hash tables.
Definition: hash.h:504
USD_API bool ClearMetadataByDictKey(const TfToken &key, const TfToken &keyPath) const
Clear any authored value identified by key and keyPath at the current EditTarget.
bool UsdIsConcrete(UsdObjType type)
Return true if type is a concrete object type, namely one of Prim, Attribute, or Relationship.
Definition: object.h:101
USD_API std::string GetDocumentation() const
Return this object's documentation (metadata).
USD_API void SetAssetInfoByKey(const TfToken &keyPath, const VtValue &value) const
Author the element identified by keyPath in this object's assetInfo dictionary at the current EditTar...
USD_API VtValue GetCustomDataByKey(const TfToken &keyPath) const
Return the element identified by keyPath in this object's composed customData dictionary.
Token for efficient comparison, assignment, and hashing of known strings.
Definition: token.h:87
USD_API bool ClearMetadata(const TfToken &key) const
Clears the authored key's value at the current EditTarget, returning false on error.
USD_API void ClearAssetInfoByKey(const TfToken &keyPath) const
Clear the authored opinion identified by keyPath in this object's assetInfo dictionary at the current...
USD_API bool ClearDisplayName() const
Clears this object's display name (metadata) in the current EditTarget (only).
USD_API VtValue GetAssetInfoByKey(const TfToken &keyPath) const
Return the element identified by keyPath in this object's composed assetInfo dictionary.
USD_API VtDictionary GetAssetInfo() const
Return this object's composed assetInfo dictionary.
USD_API bool HasMetadataDictKey(const TfToken &key, const TfToken &keyPath) const
Return true if there exists any authored or fallback opinion for key and keyPath.
#define TF_VERIFY(cond, format,...)
Checks a condition and reports an error if it evaluates false.
Definition: diagnostic.h:283
USD_API void ClearAssetInfo() const
Clear the authored opinion for this object's assetInfo dictionary at the current EditTarget.
USD_API bool IsHidden() const
Gets the value of the 'hidden' metadata field, false if not authored.
Base class for Usd scenegraph objects, providing common API.
Definition: object.h:132
USD_API std::string GetDescription() const
Return a string that provides a brief summary description of the object.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
Definition: prim.h:135
USD_API bool HasAuthoredAssetInfo() const
Return true if there are any authored opinions (excluding fallback) for this object's assetInfo dicti...
SDF_API const TfToken & GetNameToken() const
Returns the name of the prim, property or relational attribute identified by the path,...
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:290
bool GetMetadata(const TfToken &key, T *value) const
Resolve the requested metadatum named key into value, returning true on success.
Definition: object.h:756
USD_API bool HasAuthoredCustomDataKey(const TfToken &keyPath) const
Return true if there are any authored opinions (excluding fallback) for the element identified by key...
USD_API VtDictionary GetCustomData() const
Return this object's composed customData dictionary.
A UsdRelationship creates dependencies between scenegraph objects by allowing a prim to target other ...
Definition: relationship.h:128
USD_API bool HasMetadata(const TfToken &key) const
Returns true if the key has a meaningful value, that is, if GetMetadata() will provide a value,...
USD_API bool HasAssetInfo() const
Return true if there are any authored or fallback opinions for this object's assetInfo dictionary,...
bool UsdIsConvertible(UsdObjType from, UsdObjType to)
Return true if from is convertible to to, false otherwise.
Definition: object.h:94
Base class for UsdAttribute and UsdRelationship scenegraph objects.
Definition: property.h:55
SdfSpecType
An enum that specifies the type of an object.
Definition: types.h:91
USD_API UsdMetadataValueMap GetAllMetadata() const
Resolve and return all metadata (including both authored and fallback values) on this object,...
const SdfPath & GetPrimPath() const
Return this object's path if this object is a prim, otherwise this object's nearest owning prim's pat...
Definition: object.h:218
const TfToken & GetName() const
Return the full name of this object, i.e.
Definition: object.h:238
UsdObject()
Default constructor produces an invalid object.
Definition: object.h:135
SDF_API SdfPath AppendProperty(TfToken const &propName) const
Creates a path by appending an element for propName to this path.
friend bool operator==(const UsdObject &lhs, const UsdObject &rhs)
Equality comparison.
Definition: object.h:164
friend bool operator!=(const UsdObject &lhs, const UsdObject &rhs)
Inequality comparison.
Definition: object.h:173
USD_API bool HasAuthoredAssetInfoKey(const TfToken &keyPath) const
Return true if there are any authored opinions (excluding fallback) for the element identified by key...
USD_API bool HasAuthoredHidden() const
Returns true if hidden was explicitly authored and GetMetadata() will return a meaningful value for H...
USD_API UsdMetadataValueMap GetAllAuthoredMetadata() const
Resolve and return all user-authored metadata on this object, sorted lexicographically.
USD_API bool HasAuthoredDisplayName() const
Returns true if displayName was explicitly authored and GetMetadata() will return a meaningful value ...
bool IsValid() const
Return true if this is a valid object, false otherwise.
Definition: object.h:143
USD_API bool HasAuthoredDocumentation() const
Returns true if documentation was explicitly authored and GetMetadata() will return a meaningful valu...
bool IsEmpty() const noexcept
Returns true if this is the empty path (SdfPath::EmptyPath()).
Definition: path.h:419
static SDF_API const SdfPath & EmptyPath()
The empty path value, equivalent to SdfPath().
bool GetMetadataByDictKey(const TfToken &key, const TfToken &keyPath, T *value) const
Resolve the requested dictionary sub-element keyPath of dictionary-valued metadatum named key into va...
Definition: object.h:772
USD_API void ClearCustomData() const
Clear the authored opinion for this object's customData dictionary at the current EditTarget.
UsdPrim GetPrim() const
Return this object if it is a prim, otherwise return this object's nearest owning prim.
Definition: prim.h:2610
Provides a container which may hold any type, and provides introspection and iteration over array typ...
Definition: value.h:166
USD_API void SetCustomData(const VtDictionary &customData) const
Author this object's customData dictionary to customData at the current EditTarget.
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...
SdfPath GetPath() const
Return the complete scene path to this object on its UsdStage, which may (UsdPrim) or may not (all ot...
Definition: object.h:203
bool Is() const
Return true if this object is convertible to T.
Definition: object.h:257