7 #ifndef PXR_USD_USD_NAMESPACE_EDITOR_H
8 #define PXR_USD_USD_NAMESPACE_EDITOR_H
60 const UsdStageRefPtr &stage,
61 EditOptions &&editOptions);
65 const UsdStageRefPtr &stage,
66 const EditOptions &editOptions);
279 enum class _EditType {
288 struct _EditDescription {
299 bool IsPropertyEdit()
const {
return oldPath.IsPrimPropertyPath(); }
307 struct _ProcessedEdit
311 std::vector<std::string> errors;
316 std::vector<std::string> warnings;
319 _EditDescription editDescription;
323 SdfLayerHandleVector layersToEdit;
326 bool willAuthorRelocates =
false;
345 std::vector<TargetPathListOpEdit> targetPathListOpEdits;
362 bool _AddPrimDelete(
const SdfPath &oldPath);
365 bool _AddPrimMove(
const SdfPath &oldPath,
const SdfPath &newPath);
368 bool _AddPropertyDelete(
const SdfPath &oldPath);
371 bool _AddPropertyMove(
const SdfPath &oldPath,
const SdfPath &newPath);
374 void _ClearProcessedEdits();
378 void _ProcessEditsIfNeeded()
const;
383 class _EditProcessor;
385 UsdStageRefPtr _stage;
388 using _StageSet = std::unordered_set<UsdStageRefPtr, TfHash>;
389 _StageSet _dependentStages;
391 _EditDescription _editDescription;
392 mutable std::optional<_ProcessedEdit> _processedEdit;
397 #endif // PXR_USD_USD_NAMESPACE_EDITOR_H
#define PXR_NAMESPACE_OPEN_SCOPE
USD_API void RemoveDependentStage(const UsdStageRefPtr &stage)
Removes the given stage as a dependent stage of this namespace editor.
GLsizei const GLchar *const * path
USD_API SdfLayerHandleVector GetLayersToEdit()
SdfPathListOp newFieldValue
SdfPropertySpecHandle propertySpec
class SdfListOp< class SdfPath > SdfPathListOp
USD_API void SetDependentStages(const UsdStageRefPtrVector &stages)
bool allowRelocatesAuthoring
USD_API bool MovePrimAtPath(const SdfPath &path, const SdfPath &newPath)
USD_API bool RenamePrim(const UsdPrim &prim, const TfToken &newName)
USD_API bool DeletePrim(const UsdPrim &prim)
USD_API bool RenameProperty(const UsdProperty &property, const TfToken &newName)
USD_API CanApplyResult CanApplyEdits() const
USD_API bool DeletePropertyAtPath(const SdfPath &path)
std::vector< std::string > warnings
USD_API bool MovePropertyAtPath(const SdfPath &path, const SdfPath &newPath)
USD_API bool ReparentPrim(const UsdPrim &prim, const UsdPrim &newParent)
#define PXR_NAMESPACE_CLOSE_SCOPE
USD_API void AddDependentStage(const UsdStageRefPtr &stage)
Adds the given stage as a dependent stage of this namespace editor.
USD_API bool DeleteProperty(const UsdProperty &property)
USD_API UsdNamespaceEditor(const UsdStageRefPtr &stage)
std::vector< std::string > errors
USD_API bool ReparentProperty(const UsdProperty &property, const UsdPrim &newParent)
USD_API bool DeletePrimAtPath(const SdfPath &path)
USD_API bool ApplyEdits()