24 #ifndef SDF_CHANGELIST_H
25 #define SDF_CHANGELIST_H
30 #include "pxr/usd/sdf/api.h"
31 #include "pxr/usd/sdf/path.h"
32 #include "pxr/usd/sdf/types.h"
36 #include <unordered_map>
39 PXR_NAMESPACE_OPEN_SCOPE
42 typedef std::map<SdfLayerHandle, SdfChangeList> SdfLayerChangeListMap;
52 enum SubLayerChangeType {
59 void DidReplaceLayerContent();
60 void DidReloadLayerContent();
61 void DidChangeLayerResolvedPath();
62 void DidChangeLayerIdentifier(
const std::string &oldIdentifier);
63 void DidChangeSublayerPaths(
const std::string &subLayerPath,
64 SubLayerChangeType changeType);
66 void DidAddPrim(
const SdfPath &primPath,
bool inert);
67 void DidRemovePrim(
const SdfPath &primPath,
bool inert);
68 void DidReorderPrims(
const SdfPath &parentPath);
69 void DidChangePrimName(
const SdfPath &oldPath,
const SdfPath &newPath);
70 void DidChangePrimVariantSets(
const SdfPath &primPath);
71 void DidChangePrimInheritPaths(
const SdfPath &primPath);
72 void DidChangePrimReferences(
const SdfPath &primPath);
73 void DidChangePrimSpecializes(
const SdfPath &primPath);
75 void DidAddProperty(
const SdfPath &propPath,
bool hasOnlyRequiredFields);
76 void DidRemoveProperty(
const SdfPath &propPath,
bool hasOnlyRequiredFields);
77 void DidReorderProperties(
const SdfPath &propPath);
78 void DidChangePropertyName(
const SdfPath &oldPath,
const SdfPath &newPath);
80 void DidChangeAttributeTimeSamples(
const SdfPath &attrPath);
81 void DidChangeAttributeConnection(
const SdfPath &attrPath);
82 void DidChangeRelationshipTargets(
const SdfPath &relPath);
83 void DidAddTarget(
const SdfPath &targetPath);
84 void DidRemoveTarget(
const SdfPath &targetPath);
109 typedef std::pair<VtValue, VtValue> InfoChange;
110 typedef std::map<TfToken, InfoChange, TfTokenFastArbitraryLessThan>
112 InfoChangeMap infoChanged;
114 typedef std::pair<std::string, SubLayerChangeType> SubLayerChange;
115 std::vector<SubLayerChange> subLayerChanges;
121 std::string oldIdentifier;
126 memset(
this, 0,
sizeof(*
this));
130 bool didChangeIdentifier:1;
131 bool didChangeResolvedPath:1;
132 bool didReplaceContent:1;
133 bool didReloadContent:1;
136 bool didReorderChildren:1;
137 bool didReorderProperties:1;
143 bool didChangePrimVariantSets:1;
144 bool didChangePrimInheritPaths:1;
145 bool didChangePrimSpecializes:1;
146 bool didChangePrimReferences:1;
149 bool didChangeAttributeTimeSamples:1;
150 bool didChangeAttributeConnection:1;
151 bool didChangeRelationshipTargets:1;
153 bool didRemoveTarget:1;
156 bool didAddInertPrim:1;
157 bool didAddNonInertPrim:1;
158 bool didRemoveInertPrim:1;
159 bool didRemoveNonInertPrim:1;
162 bool didAddPropertyWithOnlyRequiredFields:1;
163 bool didAddProperty:1;
164 bool didRemovePropertyWithOnlyRequiredFields:1;
165 bool didRemoveProperty:1;
172 typedef std::unordered_map<SdfPath, Entry, SdfPath::Hash>
EntryList;
175 const EntryList & GetEntryList()
const {
return _entries; }
178 Entry
const &GetEntry(
const SdfPath & )
const;
181 Entry &_GetEntry(
SdfPath const &);
189 PXR_NAMESPACE_CLOSE_SCOPE
191 #endif // SDF_CHANGELIST_H
Entry of changes at a single path in namespace.
Token for efficient comparison, assignment, and hashing of known strings.
std::unordered_map< SdfPath, Entry, SdfPath::Hash > EntryList
Map of change entries at various paths in a layer.
A path value used to locate objects in layers or scenegraphs.
A list of scene description modifications, organized by the namespace paths where the changes occur...
GF_API std::ostream & operator<<(std::ostream &, const GfBBox3d &)
Output a GfBBox3d using the format [(range) matrix zeroArea].
Provides a container which may hold any type, and provides introspection and iteration over array typ...