7#ifndef PXR_USD_PCP_DEPENDENT_NAMESPACE_EDIT_UTILS_H
8#define PXR_USD_PCP_DEPENDENT_NAMESPACE_EDIT_UTILS_H
11#include "pxr/usd/pcp/api.h"
12#include "pxr/usd/pcp/cache.h"
13#include "pxr/usd/sdf/path.h"
17#include "pxr/base/vt/value.h"
20#include <unordered_map>
23PXR_NAMESPACE_OPEN_SCOPE
59 using MoveEditDescriptionVector = std::vector<MoveEditDescription>;
63 SdfLayerHandle, MoveEditDescriptionVector,
TfHash>;
69 std::unordered_map<SdfLayerHandle, SdfRelocates, TfHash>;
85 std::unordered_map<const PcpCache *, MoveEditDescriptionVector>
103PcpGatherDependentNamespaceEdits(
106 const SdfLayerHandleVector &affectedLayers,
107 const PcpLayerStackRefPtr &addRelocatesToLayerStack,
108 const SdfLayerHandle &addRelocatesToLayerStackEditLayer,
109 const std::vector<const PcpCache *> &dependentCaches);
119PcpGatherLayersToEditForSpecMove(
120 const PcpLayerStackRefPtr &layerStack,
123 std::vector<std::string> *errors);
125PXR_NAMESPACE_CLOSE_SCOPE
Structure for bundling all the edits that need to be performed in order to perform a namespace edit a...
std::vector< std::string > warnings
Warnings encountered during the processing of the dependent namespace edits.
VtValue newFieldValue
New value of the composition field to set.
TfToken fieldName
Name of the composition field.
std::unordered_map< const PcpCache *, MoveEditDescriptionVector > dependentCachePathChanges
Lists of composed prim paths in each affected cache whose prim indexes will need to be recomputed aft...
SdfLayerHandle layer
Layer containing the prim spec to edit.
SdfPath path
Path of the prim spec to edit.
std::unordered_map< SdfLayerHandle, SdfRelocates, TfHash > LayerRelocatesEdits
Map of layer to relocates value to set in the layer metadata relocates field.
std::unordered_map< SdfLayerHandle, MoveEditDescriptionVector, TfHash > LayerSpecMoveEdits
Map of layer to the spec moves edits to perform on the layer.
std::vector< std::string > errors
Errors encountered during the processing of the dependent namespace edits.
std::vector< CompositionFieldEdit > compositionFieldEdits
List of all composition fields edits to perform.
Description of an edit to a prim spec composition field, such as references, inherits,...
Description of move edit which consists of the old (source) path and the new (destination) path.
Represents a stack of layers that contribute opinions to composition.
A scene description container that can combine with other such containers to form simple component as...
A path value used to locate objects in layers or scenegraphs.
A user-extensible hashing mechanism for use with runtime hash tables.
Token for efficient comparison, assignment, and hashing of known strings.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
#define TF_DECLARE_REF_PTRS(type)
Define standard ref pointer types.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...