|
PcpPrimIndex is an index of the all sites of scene description that contribute opinions to a specific prim, under composition semantics. More...
#include <primIndex.h>
Public Member Functions | |
PCP_API | PcpPrimIndex () |
Default construct an empty, invalid prim index. | |
PCP_API | PcpPrimIndex (const PcpPrimIndex &rhs) |
Copy-construct a prim index. | |
PcpPrimIndex (PcpPrimIndex &&rhs) noexcept=default | |
Move-construction. | |
PcpPrimIndex & | operator= (const PcpPrimIndex &rhs) |
Assignment. | |
PcpPrimIndex & | operator= (PcpPrimIndex &&rhs) noexcept=default |
PCP_API void | Swap (PcpPrimIndex &rhs) |
Swap the contents of this prim index with index . | |
void | swap (PcpPrimIndex &rhs) |
Same as Swap(), but standard name. | |
bool | IsValid () const |
Return true if this index is valid. | |
void | SetGraph (const PcpPrimIndex_GraphRefPtr &graph) |
PcpNodeRef | AddChildPrimIndex (const PcpArc &arcToParent, PcpPrimIndex &&childPrimIndex, PcpErrorBasePtr *error) |
Add the nodes in childPrimIndex to this prim index; arcToParent specifies the node in this prim index where the root node of childPrimIndex will be added, along with other information about the composition arc connecting the two prim indexes. | |
const PcpPrimIndex_GraphRefPtr & | GetGraph () const |
PCP_API PcpNodeRef | GetRootNode () const |
Returns the root node of the prim index graph. | |
PCP_API const SdfPath & | GetPath () const |
Returns the path of the prim whose opinions are represented by this prim index. | |
PCP_API bool | HasSpecs () const |
Returns true if this prim index contains any scene description opinions. | |
PCP_API bool | HasAnyPayloads () const |
Returns true if the prim has any authored payload arcs. | |
PCP_API bool | IsUsd () const |
Returns true if this prim index was composed in USD mode. | |
PCP_API bool | IsInstanceable () const |
Returns true if this prim index is instanceable. | |
Iteration | |
PCP_API PcpNodeRange | GetNodeRange (PcpRangeType rangeType=PcpRangeTypeAll) const |
Returns range of iterators that encompass all children of the root node with the given arc type as well as their descendants, in strong-to-weak order. | |
PCP_API PcpNodeIterator | GetNodeIteratorAtNode (const PcpNodeRef &node) const |
Returns the node iterator that points to the given node if the node is in the prim index graph. | |
PCP_API PcpNodeRange | GetNodeSubtreeRange (const PcpNodeRef &node) const |
Returns range of iterators that encompass the given node and all of its descendants in strong-to-weak order. | |
PCP_API PcpPrimRange | GetPrimRange (PcpRangeType rangeType=PcpRangeTypeAll) const |
Returns range of iterators that encompasses all prims, in strong-to-weak order. | |
PCP_API PcpPrimRange | GetPrimRangeForNode (const PcpNodeRef &node) const |
Returns range of iterators that encompasses all prims from the site of node . | |
Lookup | |
PCP_API PcpNodeRef | GetNodeProvidingSpec (const SdfPrimSpecHandle &primSpec) const |
Returns the node that brings opinions from primSpec into this prim index. | |
PCP_API PcpNodeRef | GetNodeProvidingSpec (const SdfLayerHandle &layer, const SdfPath &path) const |
Returns the node that brings opinions from the Sd prim spec at layer and path into this prim index. | |
Diagnostics | |
PcpErrorVector | GetLocalErrors () const |
Return the list of errors local to this prim. | |
PCP_API void | PrintStatistics () const |
Prints various statistics about this prim index. | |
PCP_API std::string | DumpToString (bool includeInheritOriginInfo=true, bool includeMaps=true) const |
Dump the prim index contents to a string. | |
PCP_API void | DumpToDotGraph (const std::string &filename, bool includeInheritOriginInfo=true, bool includeMaps=false) const |
Dump the prim index in dot format to the file named filename . | |
Derived computations | |
PCP_API void | ComputePrimChildNames (TfTokenVector *nameOrder, PcpTokenSet *prohibitedNameSet) const |
Compute the prim child names for the given path. | |
PCP_API void | ComputePrimChildNamesInSubtree (const PcpNodeRef &subtreeRootNode, TfTokenVector *nameOrder, PcpTokenSet *prohibitedNameSet) const |
Compute the prim child names for this prim when composed from only the subtree starting at subtreeRootNode . | |
PCP_API void | ComputePrimPropertyNames (TfTokenVector *nameOrder) const |
Compute the prim property names for the given path. | |
PCP_API SdfVariantSelectionMap | ComposeAuthoredVariantSelections () const |
Compose the authored prim variant selections. | |
PCP_API std::string | GetSelectionAppliedForVariantSet (const std::string &variantSet) const |
Return the variant selection applied for the named variant set. | |
Friends | |
class | PcpPrimIterator |
PcpPrimIndex is an index of the all sites of scene description that contribute opinions to a specific prim, under composition semantics.
PcpComputePrimIndex() builds an index ("indexes") the given prim site. At any site there may be scene description values expressing arcs that represent instructions to pull in further scene description. PcpComputePrimIndex() recursively follows these arcs, building and ordering the results.
Definition at line 61 of file primIndex.h.
PCP_API PcpPrimIndex | ( | ) |
Default construct an empty, invalid prim index.
PCP_API PcpPrimIndex | ( | const PcpPrimIndex & | rhs | ) |
Copy-construct a prim index.
|
defaultnoexcept |
Move-construction.
PcpNodeRef AddChildPrimIndex | ( | const PcpArc & | arcToParent, |
PcpPrimIndex && | childPrimIndex, | ||
PcpErrorBasePtr * | error | ||
) |
Add the nodes in childPrimIndex
to this prim index; arcToParent
specifies the node in this prim index where the root node of childPrimIndex
will be added, along with other information about the composition arc connecting the two prim indexes.
Return the node in this prim index corresponding to the root node of childPrimIndex
.
PCP_API SdfVariantSelectionMap ComposeAuthoredVariantSelections | ( | ) | const |
Compose the authored prim variant selections.
These are the variant selections expressed in scene description. Note that these selections may not have actually been applied, if they are invalid.
PCP_API void ComputePrimChildNames | ( | TfTokenVector * | nameOrder, |
PcpTokenSet * | prohibitedNameSet | ||
) | const |
Compute the prim child names for the given path.
errors
will contain any errors encountered while performing this operation.
PCP_API void ComputePrimChildNamesInSubtree | ( | const PcpNodeRef & | subtreeRootNode, |
TfTokenVector * | nameOrder, | ||
PcpTokenSet * | prohibitedNameSet | ||
) | const |
Compute the prim child names for this prim when composed from only the subtree starting at subtreeRootNode
.
PCP_API void ComputePrimPropertyNames | ( | TfTokenVector * | nameOrder | ) | const |
Compute the prim property names for the given path.
errors
will contain any errors encountered while performing this operation. The nameOrder
vector must not contain any duplicate entries.
PCP_API void DumpToDotGraph | ( | const std::string & | filename, |
bool | includeInheritOriginInfo = true , |
||
bool | includeMaps = false |
||
) | const |
Dump the prim index in dot format to the file named filename
.
See Dump(...) for information regarding arguments.
PCP_API std::string DumpToString | ( | bool | includeInheritOriginInfo = true , |
bool | includeMaps = true |
||
) | const |
Dump the prim index contents to a string.
If includeInheritOriginInfo
is true
, output for implied inherit nodes will include information about the originating inherit node. If includeMaps
is true
, output for each node will include the mappings to the parent and root node.
|
inline |
Definition at line 112 of file primIndex.h.
|
inline |
Return the list of errors local to this prim.
Definition at line 206 of file primIndex.h.
PCP_API PcpNodeIterator GetNodeIteratorAtNode | ( | const PcpNodeRef & | node | ) | const |
Returns the node iterator that points to the given node
if the node is in the prim index graph.
Returns the end of the node range if the node is not contained in this prim index.
PCP_API PcpNodeRef GetNodeProvidingSpec | ( | const SdfLayerHandle & | layer, |
const SdfPath & | path | ||
) | const |
Returns the node that brings opinions from the Sd prim spec at layer
and path
into this prim index.
If no such node exists, returns an invalid PcpNodeRef.
PCP_API PcpNodeRef GetNodeProvidingSpec | ( | const SdfPrimSpecHandle & | primSpec | ) | const |
Returns the node that brings opinions from primSpec
into this prim index.
If no such node exists, returns an invalid PcpNodeRef.
PCP_API PcpNodeRange GetNodeRange | ( | PcpRangeType | rangeType = PcpRangeTypeAll | ) | const |
Returns range of iterators that encompass all children of the root node with the given arc type as well as their descendants, in strong-to-weak order.
By default, this returns a range encompassing the entire index.
PCP_API PcpNodeRange GetNodeSubtreeRange | ( | const PcpNodeRef & | node | ) | const |
Returns range of iterators that encompass the given node
and all of its descendants in strong-to-weak order.
PCP_API const SdfPath & GetPath | ( | ) | const |
Returns the path of the prim whose opinions are represented by this prim index.
PCP_API PcpPrimRange GetPrimRange | ( | PcpRangeType | rangeType = PcpRangeTypeAll | ) | const |
Returns range of iterators that encompasses all prims, in strong-to-weak order.
PCP_API PcpPrimRange GetPrimRangeForNode | ( | const PcpNodeRef & | node | ) | const |
Returns range of iterators that encompasses all prims from the site of node
.
node
must belong to this prim index.
PCP_API PcpNodeRef GetRootNode | ( | ) | const |
Returns the root node of the prim index graph.
PCP_API std::string GetSelectionAppliedForVariantSet | ( | const std::string & | variantSet | ) | const |
Return the variant selection applied for the named variant set.
If none was applied, this returns an empty string. This can be different from the authored variant selection; for example, if the authored selection is invalid.
PCP_API bool HasAnyPayloads | ( | ) | const |
Returns true if the prim has any authored payload arcs.
The payload contents are only resolved and included if this prim's path is in the payload inclusion set provided in PcpPrimIndexInputs.
PCP_API bool HasSpecs | ( | ) | const |
Returns true if this prim index contains any scene description opinions.
PCP_API bool IsInstanceable | ( | ) | const |
Returns true if this prim index is instanceable.
Instanceable prim indexes with the same instance key are guaranteed to have the same set of opinions, but may not have local opinions about name children.
PCP_API bool IsUsd | ( | ) | const |
Returns true if this prim index was composed in USD mode.
|
inline |
Return true if this index is valid.
A default-constructed index is invalid.
Definition at line 93 of file primIndex.h.
|
inline |
Assignment.
Definition at line 76 of file primIndex.h.
PCP_API void PrintStatistics | ( | ) | const |
Prints various statistics about this prim index.
|
inline |
Definition at line 95 of file primIndex.h.
PCP_API void Swap | ( | PcpPrimIndex & | rhs | ) |
Swap the contents of this prim index with index
.
|
inline |
Same as Swap(), but standard name.
Definition at line 89 of file primIndex.h.
|
friend |
Definition at line 280 of file primIndex.h.