HDK
|
#include <resolver.h>
Public Member Functions | |
USD_API | Usd_Resolver (const PcpPrimIndex *index, bool skipEmptyNodes=true) |
USD_API | Usd_Resolver (const UsdResolveTarget *resolveTarget, bool skipEmptyNodes=true) |
bool | IsValid () const |
USD_API bool | NextLayer () |
USD_API void | NextNode () |
PcpNodeRef | GetNode () const |
const SdfLayerRefPtr & | GetLayer () const |
const SdfPath & | GetLocalPath () const |
SdfPath | GetLocalPath (TfToken const &propName) const |
const PcpPrimIndex * | GetPrimIndex () const |
Given a PcpPrimIndex, this class facilitates value resolution by providing a mechanism for walking the composition structure in strong-to-weak order.
Definition at line 47 of file resolver.h.
|
explicit |
Constructs a resolver with the given index
. The index is held for the duration of the resolver's lifetime. If skipEmptyNodes
is true
, the resolver will skip over nodes that provide no opinions about the prim represented by index
. Otherwise, the resolver will visit all non-inert nodes in the index.
|
explicit |
Constructs a resolver with the given resolveTarget
. The resolve target provides the prim index as well as the range of nodes and layers this resolver will iterate over. If skipEmptyNodes
is true
, the resolver will skip over nodes that provide no opinions about the prim represented by index
. Otherwise, the resolver will visit all non-inert nodes in the index.
|
inline |
Returns the current layer for the current PcpNode for a valid resolver.
The behavior is undefined if the resolver is not valid.
PERFORMANCE: This returns a const-ref to avoid ref-count bumps during resolution. This is safe under the assumption that no changes will occur during resolution and that the lifetime of this object will be short.
Definition at line 117 of file resolver.h.
|
inline |
Returns a translated path for the current PcpNode and Layer for a valid resolver.
The behavior is undefined if the resolver is not valid.
Definition at line 125 of file resolver.h.
Returns a translated path of the property with the given propName
for the current PcpNode and Layer for a valid resolver.
The behavior is undefined if the resolver is not valid.
Definition at line 133 of file resolver.h.
|
inline |
Returns the current PCP node for a valid resolver.
This is useful for coarse grained resolution tasks, however individual layers must be inspected in the common case.
The behavior is undefined if the resolver is not valid.
Definition at line 106 of file resolver.h.
|
inline |
Returns the PcpPrimIndex.
This value is initialized when the resolver is constructed and does not change as a result of calling NextLayer() or NextNode().
Definition at line 142 of file resolver.h.
|
inline |
Returns true when there is a current Node and Layer.
The resolver must be known to be valid before calling any of the accessor or iteration functions, otherwise the behavior will be undefined.
Definition at line 76 of file resolver.h.
USD_API bool Usd_Resolver::NextLayer | ( | ) |
Advances the resolver to the next weaker Layer in the layer stack, if the current LayerStack has no more layers, the resolver will be advanced to the next weaker PcpNode. If no layers are available, the resolver will be marked as invalid. Returns true
iff the resolver advanced to another node or became invalid.
If the resolver is already invalid, the behavior of this function is undefined.
Skips all pending layers in the current LayerStack and jumps to the next weaker PcpNode. When no more nodes are available, the resolver will be marked as invalid.
If the resolver is already invalid, the behavior of this function is undefined.