All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PcpPrimIndex Class Reference

PcpPrimIndex is an index of the all sites of scene description that contribute opinions to a specific prim, under composition semantics. More...

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...
 
PcpPrimIndexoperator= (const PcpPrimIndex &rhs)
 Assignment. More...
 
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
 Return true if this index is valid. More...
 
PCP_API void SetGraph (const PcpPrimIndex_GraphRefPtr &graph)
 
PCP_API PcpPrimIndex_GraphPtr GetGraph () const
 
PCP_API PcpNodeRef GetRootNode () const
 Returns the root node of the prim index graph. More...
 
PCP_API const SdfPathGetPath () const
 Returns the path of the prim whose opinions are represented by this prim index. More...
 
PCP_API bool HasSpecs () const
 Returns true if this prim index contains any scene description opinions. More...
 
PCP_API bool HasAnyPayloads () const
 Returns true if the prim has any authored payload arcs. More...
 
PCP_API bool IsUsd () const
 Returns true if this prim index was composed in USD mode. More...
 
PCP_API bool IsInstanceable () const
 Returns true if this prim index is instanceable. More...
 
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. More...
 
PCP_API PcpPrimRange GetPrimRange (PcpRangeType rangeType=PcpRangeTypeAll) const
 Returns range of iterators that encompasses all prims, in strong-to-weak order. More...
 
PCP_API PcpPrimRange GetPrimRangeForNode (const PcpNodeRef &node) const
 Returns range of iterators that encompasses all prims from the site of node. More...
 
Lookup
PCP_API PcpNodeRef GetNodeProvidingSpec (const SdfPrimSpecHandle &primSpec) const
 Returns the node that brings opinions from primSpec into this prim index. More...
 
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. More...
 
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
 Dump the prim index contents to a string. More...
 
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. More...
 
Derived computations
PCP_API void ComputePrimChildNames (TfTokenVector *nameOrder, PcpTokenSet *prohibitedNameSet) const
 Compute the prim child names for the given path. More...
 
PCP_API void ComputePrimPropertyNames (TfTokenVector *nameOrder) const
 Compute the prim property names for the given path. More...
 
PCP_API SdfVariantSelectionMap ComposeAuthoredVariantSelections () const
 Compose the authored prim variant selections. More...
 
PCP_API std::string GetSelectionAppliedForVariantSet (const std::string &variantSet) const
 Return the variant selection applied for the named variant set. More...
 

Friends

class PcpPrimIterator
 

Detailed Description

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.

Constructor & Destructor Documentation

PCP_API PcpPrimIndex ( )

Default construct an empty, invalid prim index.

PCP_API PcpPrimIndex ( const PcpPrimIndex rhs)

Copy-construct a prim index.

Member Function Documentation

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.

Note
This result is not cached, but computed each time.
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 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.

PcpErrorVector GetLocalErrors ( ) const
inline

Return the list of errors local to this prim.

Definition at line 188 of file primIndex.h.

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 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 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 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.

See Also
PcpInstanceKey
PCP_API bool IsUsd ( ) const

Returns true if this prim index was composed in USD mode.

See Also
PcpCache::IsUsd().
bool IsValid ( ) const
inline

Return true if this index is valid.

A default-constructed index is invalid.

Definition at line 103 of file primIndex.h.

PcpPrimIndex& operator= ( const PcpPrimIndex rhs)
inline

Assignment.

Definition at line 89 of file primIndex.h.

PCP_API void PrintStatistics ( ) const

Prints various statistics about this prim index.

PCP_API void Swap ( PcpPrimIndex rhs)

Swap the contents of this prim index with index.

void swap ( PcpPrimIndex rhs)
inline

Same as Swap(), but standard name.

Definition at line 99 of file primIndex.h.


The documentation for this class was generated from the following file: