7 #ifndef PXR_USD_USD_NAMESPACE_EDITOR_H
8 #define PXR_USD_USD_NAMESPACE_EDITOR_H
46 const UsdStageRefPtr &stage,
51 const UsdStageRefPtr &stage,
246 enum class _EditType {
255 struct _EditDescription {
266 bool IsPropertyEdit()
const {
return oldPath.IsPrimPropertyPath(); }
274 struct _ProcessedEdit
278 std::vector<std::string> errors;
281 _EditDescription editDescription;
285 SdfLayerHandleVector layersToEdit;
288 bool willAuthorRelocates =
false;
307 std::vector<TargetPathListOpEdit> targetPathListOpEdits;
317 std::vector<std::string> targetPathListOpErrors;
324 bool CanApply(std::string *whyNot)
const;
328 bool _AddPrimDelete(
const SdfPath &oldPath);
331 bool _AddPrimMove(
const SdfPath &oldPath,
const SdfPath &newPath);
334 bool _AddPropertyDelete(
const SdfPath &oldPath);
337 bool _AddPropertyMove(
const SdfPath &oldPath,
const SdfPath &newPath);
340 void _ClearProcessedEdits();
344 void _ProcessEditsIfNeeded()
const;
349 class _EditProcessor;
351 UsdStageRefPtr _stage;
354 using _StageSet = std::unordered_set<UsdStageRefPtr, TfHash>;
355 _StageSet _dependentStages;
357 _EditDescription _editDescription;
358 mutable std::optional<_ProcessedEdit> _processedEdit;
363 #endif // PXR_USD_USD_NAMESPACE_EDITOR_H
USD_API void RemoveDependentStage(const UsdStageRefPtr &stage)
Removes the given stage as a dependent stage of this namespace editor.
GLsizei const GLchar *const * path
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 CanApplyEdits(std::string *whyNot=nullptr) const
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 bool DeletePropertyAtPath(const SdfPath &path)
USD_API bool MovePropertyAtPath(const SdfPath &path, const SdfPath &newPath)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
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)
USD_API bool ReparentProperty(const UsdProperty &property, const UsdPrim &newParent)
USD_API bool DeletePrimAtPath(const SdfPath &path)
USD_API bool ApplyEdits()