HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dependentNamespaceEditUtils.h File Reference
#include "pxr/pxr.h"
#include "pxr/usd/pcp/api.h"
#include "pxr/usd/pcp/cache.h"
#include "pxr/usd/sdf/path.h"
#include "pxr/usd/sdf/declareHandles.h"
#include "pxr/base/tf/hash.h"
#include "pxr/base/tf/token.h"
#include "pxr/base/vt/value.h"
#include <string>
#include <unordered_map>
#include <vector>
+ Include dependency graph for dependentNamespaceEditUtils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PcpDependentNamespaceEdits
 
struct  PcpDependentNamespaceEdits::CompositionFieldEdit
 
struct  PcpDependentNamespaceEdits::MoveEditDescription
 

Functions

PXR_NAMESPACE_OPEN_SCOPE SDF_DECLARE_HANDLES (SdfLayer)
 
 TF_DECLARE_REF_PTRS (PcpLayerStack)
 
PCP_API PcpDependentNamespaceEdits PcpGatherDependentNamespaceEdits (const SdfPath &oldPrimPath, const SdfPath &newPrimPath, const SdfLayerHandleVector &affectedLayers, const PcpLayerStackRefPtr &addRelocatesToLayerStack, const SdfLayerHandle &addRelocatesToLayerStackEditLayer, const std::vector< const PcpCache * > &dependentCaches)
 
PCP_API SdfLayerHandleVector PcpGatherLayersToEditForSpecMove (const PcpLayerStackRefPtr &layerStack, const SdfPath &oldSpecPath, const SdfPath &newSpecPath, std::vector< std::string > *errors)
 

Function Documentation

PCP_API PcpDependentNamespaceEdits PcpGatherDependentNamespaceEdits ( const SdfPath oldPrimPath,
const SdfPath newPrimPath,
const SdfLayerHandleVector &  affectedLayers,
const PcpLayerStackRefPtr &  addRelocatesToLayerStack,
const SdfLayerHandle &  addRelocatesToLayerStackEditLayer,
const std::vector< const PcpCache * > &  dependentCaches 
)

Given a prim spec move edit from oldPrimPath to newPrimPath and the affectedLayers on which this spec move will be performed, this function finds all prim indexes already cached in each PcpCache in dependentCaches that would be affected by these edits and computes a full set of edits that would be required to maintain these dependent prim indexes' composed prim stacks, possibly moving the prim index to a new prim path if necessary. If addRelocatesToLayerStack is provided, this will also add a new relocates edit to the necessary layers in the layer stack that moves oldPrimPath to newPrimPath. The layer addRelocatesToLayerStackEditLayer provided is only relevant when the relocates layer stack is also provided as it determines which specific layer in the layer stack will have a new relocates entry added to it (see PcpLayerRelocatesEditBuilder).

PCP_API SdfLayerHandleVector PcpGatherLayersToEditForSpecMove ( const PcpLayerStackRefPtr &  layerStack,
const SdfPath oldSpecPath,
const SdfPath newSpecPath,
std::vector< std::string > *  errors 
)

Gathers the list of layers that need to be edited to perform the spec move from oldSpecPath to newSpecPath on the given layerStack.

If any errors are encountered where the spec would not be able to performed on a layer that needs to be edited, those errors will be added to errors. Layers with errors are still included in the returned result regardless.

PXR_NAMESPACE_OPEN_SCOPE SDF_DECLARE_HANDLES ( SdfLayer  )
TF_DECLARE_REF_PTRS ( PcpLayerStack  )