HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pathTranslation.h File Reference
#include "pxr/pxr.h"
#include "pxr/usd/pcp/api.h"
+ Include dependency graph for pathTranslation.h:

Go to the source code of this file.

Functions

PCP_API SdfPath PcpTranslatePathFromNodeToRoot (const PcpNodeRef &sourceNode, const SdfPath &pathInNodeNamespace, bool *pathWasTranslated=0)
 
PCP_API SdfPath PcpTranslatePathFromRootToNode (const PcpNodeRef &destNode, const SdfPath &pathInRootNamespace, bool *pathWasTranslated=0)
 
PCP_API SdfPath PcpTranslateTargetPathFromRootToNode (const PcpNodeRef &destNode, const SdfPath &pathInRootNamespace, bool *pathWasTranslated=0)
 
PCP_API SdfPath PcpTranslatePathFromRootToNodeUsingFunction (const PcpMapFunction &mapToRoot, const SdfPath &pathInRootNamespace, bool *pathWasTranslated=0)
 
PCP_API SdfPath PcpTranslatePathFromNodeToRootUsingFunction (const PcpMapFunction &mapToRoot, const SdfPath &pathInNodeNamespace, bool *pathWasTranslated=0)
 

Detailed Description

Path translation.

Definition in file pathTranslation.h.

Function Documentation

PCP_API SdfPath PcpTranslatePathFromNodeToRoot ( const PcpNodeRef sourceNode,
const SdfPath pathInNodeNamespace,
bool *  pathWasTranslated = 0 
)

Translates pathInNodeNamespace from the namespace of the prim index node sourceNode to the namespace of the prim index's root node. This applies all necessary namespace translations.

If the path is successfully translated and pathWasTranslated is supplied, it will be set to true. In some cases, paths may fail to translate because they fall outside the set of paths that are allowed by nodes in the prim index. For instance, for a referenced model, paths referring to locations outside that model will not be translated. In these cases, this function will return an empty SdfPath and pathWasTranslated will be set to false.

In Sd/Csd terminology, this is forward path translation from the namespace of the prim spec represented by sourceNode to the composed scene namespace.

PCP_API SdfPath PcpTranslatePathFromNodeToRootUsingFunction ( const PcpMapFunction mapToRoot,
const SdfPath pathInNodeNamespace,
bool *  pathWasTranslated = 0 
)

Convenience function like PcpTranslatePathFromNodeToRoot, but takes a function rather than a node.

PCP_API SdfPath PcpTranslatePathFromRootToNode ( const PcpNodeRef destNode,
const SdfPath pathInRootNamespace,
bool *  pathWasTranslated = 0 
)

Translates pathInRootNamespace from the namespace of the root of the prim index that destNode belongs to to the namespace of destNode itself. This applies all necessary namespace translations.

If the path is successfully translated and pathWasTranslated is supplied, it will be set to true. In some cases, paths may fail to translate because they fall outside the set of paths that are allowed by nodes in the prim index. For instance, for a referenced model, paths referring to locations outside that model will not be translated. In these cases, this function will return an empty SdfPath and pathWasTranslated will be set to false.

In Sd/Csd terminology, this is reverse path translation from the namespace of the composed scene to the namespace of the prim spec represented by destNode.

PCP_API SdfPath PcpTranslatePathFromRootToNodeUsingFunction ( const PcpMapFunction mapToRoot,
const SdfPath pathInRootNamespace,
bool *  pathWasTranslated = 0 
)

Convenience function like PcpTranslatePathFromRootToNode, but takes a function rather than a node.

PCP_API SdfPath PcpTranslateTargetPathFromRootToNode ( const PcpNodeRef destNode,
const SdfPath pathInRootNamespace,
bool *  pathWasTranslated = 0 
)

Same as PcpTranslatePathFromRootToNode, but explicitly for use when translating paths intended for use as attribute connections or relationship targets. The primary difference is that variant selections will never be included in the translated path. This is functionally equivalent to calling StripAllVariantSelections() on the result of the referenced function, but is more efficient.