HDK
|
#include <primIndex.h>
Public Member Functions | |
PCP_API | PcpPrimIndex () |
Default construct an empty, invalid prim index. More... | |
PCP_API | PcpPrimIndex (const PcpPrimIndex &rhs) |
Copy-construct a prim index. More... | |
PcpPrimIndex (PcpPrimIndex &&rhs) noexcept=default | |
Move-construction. More... | |
PcpPrimIndex & | operator= (const PcpPrimIndex &rhs) |
Assignment. More... | |
PcpPrimIndex & | operator= (PcpPrimIndex &&rhs) noexcept=default |
PCP_API void | Swap (PcpPrimIndex &rhs) |
Swap the contents of this prim index with index . More... | |
void | swap (PcpPrimIndex &rhs) |
Same as Swap(), but standard name. More... | |
bool | IsValid () const |
void | SetGraph (const PcpPrimIndex_GraphRefPtr &graph) |
const PcpPrimIndex_GraphRefPtr & | GetGraph () const |
PCP_API PcpNodeRef | GetRootNode () const |
Returns the root node of the prim index graph. More... | |
PCP_API const SdfPath & | GetPath () const |
PCP_API bool | HasSpecs () const |
PCP_API bool | HasAnyPayloads () const |
PCP_API bool | IsUsd () const |
PCP_API bool | IsInstanceable () const |
Iteration | |
PCP_API PcpNodeRange | GetNodeRange (PcpRangeType rangeType=PcpRangeTypeAll) const |
PCP_API PcpNodeIterator | GetNodeIteratorAtNode (const PcpNodeRef &node) const |
PCP_API PcpNodeRange | GetNodeSubtreeRange (const PcpNodeRef &node) const |
PCP_API PcpPrimRange | GetPrimRange (PcpRangeType rangeType=PcpRangeTypeAll) const |
PCP_API PcpPrimRange | GetPrimRangeForNode (const PcpNodeRef &node) const |
Lookup | |
PCP_API PcpNodeRef | GetNodeProvidingSpec (const SdfPrimSpecHandle &primSpec) const |
PCP_API PcpNodeRef | GetNodeProvidingSpec (const SdfLayerHandle &layer, const SdfPath &path) const |
Diagnostics | |
PcpErrorVector | GetLocalErrors () const |
Return the list of errors local to this prim. More... | |
PCP_API void | PrintStatistics () const |
Prints various statistics about this prim index. More... | |
PCP_API std::string | DumpToString (bool includeInheritOriginInfo=true, bool includeMaps=true) const |
PCP_API void | DumpToDotGraph (const std::string &filename, bool includeInheritOriginInfo=true, bool includeMaps=false) const |
Derived computations | |
PCP_API void | ComputePrimChildNames (TfTokenVector *nameOrder, PcpTokenSet *prohibitedNameSet) const |
PCP_API void | ComputePrimPropertyNames (TfTokenVector *nameOrder) const |
PCP_API SdfVariantSelectionMap | ComposeAuthoredVariantSelections () const |
PCP_API std::string | GetSelectionAppliedForVariantSet (const std::string &variantSet) const |
Friends | |
class | PcpPrimIterator |
struct | Pcp_PrimIndexer |
void | Pcp_RescanForSpecs (PcpPrimIndex *, bool usd, bool updateHasSpecs) |
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 77 of file primIndex.h.
PCP_API PcpPrimIndex::PcpPrimIndex | ( | ) |
Default construct an empty, invalid prim index.
PCP_API PcpPrimIndex::PcpPrimIndex | ( | const PcpPrimIndex & | rhs | ) |
Copy-construct a prim index.
|
defaultnoexcept |
Move-construction.
PCP_API SdfVariantSelectionMap PcpPrimIndex::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 PcpPrimIndex::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 PcpPrimIndex::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 PcpPrimIndex::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 PcpPrimIndex::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 115 of file primIndex.h.
|
inline |
Return the list of errors local to this prim.
Definition at line 209 of file primIndex.h.
PCP_API PcpNodeIterator PcpPrimIndex::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 PcpPrimIndex::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 PcpNodeRef PcpPrimIndex::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 PcpNodeRange PcpPrimIndex::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 PcpPrimIndex::GetNodeSubtreeRange | ( | const PcpNodeRef & | node | ) | const |
Returns range of iterators that encompass the given node
and all of its descendants in strong-to-weak order.
Returns the path of the prim whose opinions are represented by this prim index.
PCP_API PcpPrimRange PcpPrimIndex::GetPrimRange | ( | PcpRangeType | rangeType = PcpRangeTypeAll | ) | const |
Returns range of iterators that encompasses all prims, in strong-to-weak order.
PCP_API PcpPrimRange PcpPrimIndex::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 PcpPrimIndex::GetRootNode | ( | ) | const |
Returns the root node of the prim index graph.
PCP_API std::string PcpPrimIndex::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 PcpPrimIndex::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 PcpPrimIndex::HasSpecs | ( | ) | const |
Returns true if this prim index contains any scene description opinions.
PCP_API bool PcpPrimIndex::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 PcpPrimIndex::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 109 of file primIndex.h.
|
inline |
Assignment.
Definition at line 92 of file primIndex.h.
|
defaultnoexcept |
Prints various statistics about this prim index.
|
inline |
Definition at line 111 of file primIndex.h.
PCP_API void PcpPrimIndex::Swap | ( | PcpPrimIndex & | rhs | ) |
Swap the contents of this prim index with index
.
|
inline |
Same as Swap(), but standard name.
Definition at line 105 of file primIndex.h.
|
friend |
Definition at line 276 of file primIndex.h.
|
friend |
|
friend |
Definition at line 275 of file primIndex.h.