24 #ifndef PXR_USD_USD_RELATIONSHIP_H 25 #define PXR_USD_USD_RELATIONSHIP_H 28 #include "pxr/usd/usd/api.h" 30 #include "pxr/usd/usd/property.h" 32 #include "pxr/usd/sdf/path.h" 33 #include "pxr/base/vt/value.h" 38 PXR_NAMESPACE_OPEN_SCOPE
44 typedef std::vector<UsdRelationship> UsdRelationshipVector;
174 bool SetTargets(
const SdfPathVector& targets)
const;
199 bool GetTargets(SdfPathVector* targets)
const;
246 friend class Usd_PrimData;
247 template <
class A0,
class A1>
248 friend struct UsdPrim_TargetFinder;
253 :
UsdProperty(UsdTypeRelationship, prim, proxyPrimPath, relName) {}
256 const Usd_PrimDataHandle &prim,
259 :
UsdProperty(objType, prim, proxyPrimPath, propName) {}
261 SdfRelationshipSpecHandle _CreateSpec(
bool fallbackCustom=
true)
const;
262 bool _Create(
bool fallbackCustom)
const;
264 bool _GetForwardedTargets(SdfPathVector* targets,
265 bool includeForwardingRels)
const;
267 bool _GetForwardedTargetsImpl(SdfPathSet* visited,
268 SdfPathSet* uniqueTargets,
269 SdfPathVector* targets,
270 bool *foundAnyErrors,
271 bool includeForwardingRels)
const;
274 std::string* whyNot = 0)
const;
278 PXR_NAMESPACE_CLOSE_SCOPE
280 #endif //PXR_USD_USD_RELATIONSHIP_H USD_API bool GetTargets(SdfPathVector *targets) const
Compose this relationship's targets and fill targets with the result.
UsdObjType
Enum values to represent the various Usd object types.
UsdListPosition
Specifies a position to add items to lists.
USD_API bool HasAuthoredTargets() const
Returns true if any target path opinions have been authored.
Token for efficient comparison, assignment, and hashing of known strings.
USD_API bool GetForwardedTargets(SdfPathVector *targets) const
Compose this relationship's ultimate targets, taking into account "relationship forwarding",...
Base class for Usd scenegraph objects, providing common API.
UsdPrim is the sole persistent scenegraph object on a UsdStage, and is the embodiment of a "Prim" as ...
USD_API bool RemoveTarget(const SdfPath &target) const
Removes target from the list of targets.
USD_API bool ClearTargets(bool removeSpec) const
Remove all opinions about the target list from the current edit target.
A path value used to locate objects in layers or scenegraphs.
A UsdRelationship creates dependencies between scenegraph objects by allowing a prim to target other ...
UsdRelationship()
Construct an invalid relationship.
USD_API bool AddTarget(const SdfPath &target, UsdListPosition position=UsdListPositionBackOfPrependList) const
Adds target to the list of targets, in the position specified by position.
Base class for UsdAttribute and UsdRelationship scenegraph objects.
The position at the back of the prepend list.
USD_API bool SetTargets(const SdfPathVector &targets) const
Make the authoring layer's opinion of the targets list explicit, and set exactly to targets.