7#ifndef PXR_USD_USD_RELATIONSHIP_H
8#define PXR_USD_USD_RELATIONSHIP_H
11#include "pxr/usd/usd/api.h"
13#include "pxr/usd/usd/property.h"
15#include "pxr/usd/sdf/path.h"
16#include "pxr/base/vt/value.h"
21PXR_NAMESPACE_OPEN_SCOPE
27typedef std::vector<UsdRelationship> UsdRelationshipVector;
229 friend class Usd_PrimData;
230 template <
class A0,
class A1>
231 friend struct UsdPrim_TargetFinder;
236 :
UsdProperty(UsdTypeRelationship, prim, proxyPrimPath, relName) {}
239 const Usd_PrimDataHandle &prim,
242 :
UsdProperty(objType, prim, proxyPrimPath, propName) {}
244 SdfRelationshipSpecHandle _CreateSpec(
bool fallbackCustom=
true)
const;
245 bool _Create(
bool fallbackCustom)
const;
247 bool _GetForwardedTargets(SdfPathVector* targets,
248 bool includeForwardingRels)
const;
250 bool _GetForwardedTargetsImpl(SdfPathSet* visited,
251 SdfPathSet* uniqueTargets,
252 SdfPathVector* targets,
253 bool *foundAnyErrors,
254 bool includeForwardingRels)
const;
257 std::string* whyNot = 0)
const;
261PXR_NAMESPACE_CLOSE_SCOPE
A path value used to locate objects in layers or scenegraphs.
Token for efficient comparison, assignment, and hashing of known strings.
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 ...
Base class for UsdAttribute and UsdRelationship scenegraph objects.
A UsdRelationship creates dependencies between scenegraph objects by allowing a prim to target other ...
USD_API bool AddTarget(const SdfPath &target, UsdListPosition position=UsdListPositionBackOfPrependList) const
Adds target to the list of targets, in the position specified by position.
USD_API bool RemoveTarget(const SdfPath &target) const
Removes target from the list of targets.
USD_API bool SetTargets(const SdfPathVector &targets) const
Make the authoring layer's opinion of the targets list explicit, and set exactly to targets.
USD_API bool GetForwardedTargets(SdfPathVector *targets) const
Compose this relationship's ultimate targets, taking into account "relationship forwarding",...
USD_API bool ClearTargets(bool removeSpec) const
Remove all opinions about the target list from the current edit target.
USD_API bool GetTargets(SdfPathVector *targets) const
Compose this relationship's targets and fill targets with the result.
UsdRelationship()
Construct an invalid relationship.
USD_API bool HasAuthoredTargets() const
Returns true if any target path opinions have been authored.
UsdListPosition
Specifies a position to add items to lists.
@ UsdListPositionBackOfPrependList
The position at the back of the prepend list.
UsdObjType
Enum values to represent the various Usd object types.