|
#include <namespaceEditor.h>
Classes | |
struct | EditOptions |
Structure for holding the options for how the namespace editor will behave when trying to perform edits. More... | |
Public Member Functions | |
USD_API | UsdNamespaceEditor (const UsdStageRefPtr &stage) |
USD_API | UsdNamespaceEditor (const UsdStageRefPtr &stage, EditOptions &&editOptions) |
USD_API | UsdNamespaceEditor (const UsdStageRefPtr &stage, const EditOptions &editOptions) |
USD_API bool | DeletePrimAtPath (const SdfPath &path) |
Adds an edit operation to delete the composed prim at the given path from this namespace editor's stage. | |
USD_API bool | MovePrimAtPath (const SdfPath &path, const SdfPath &newPath) |
Adds an edit operation to move the composed prim at the given path on this namespace editor's stage to instead be at the path newPath . | |
USD_API bool | DeletePrim (const UsdPrim &prim) |
Adds an edit operation to delete the composed prim at the path of prim from this namespace editor's stage. | |
USD_API bool | RenamePrim (const UsdPrim &prim, const TfToken &newName) |
Adds an edit operation to rename the composed prim at the path of prim on this namespace editor's stage to instead have the name newName . | |
USD_API bool | ReparentPrim (const UsdPrim &prim, const UsdPrim &newParent) |
Adds an edit operation to reparent the composed prim at the path of prim on this namespace editor's stage to instead be a namespace child of the composed prim at the path of newParent . | |
USD_API bool | ReparentPrim (const UsdPrim &prim, const UsdPrim &newParent, const TfToken &newName) |
Adds an edit operation to reparent the composed prim at the path of prim on this namespace editor's stage to instead be a prim named newName that is a namespace child of the composed prim at the path of newParent . | |
USD_API bool | DeletePropertyAtPath (const SdfPath &path) |
Adds an edit operation to delete the composed property at the given path from this namespace editor's stage. | |
USD_API bool | MovePropertyAtPath (const SdfPath &path, const SdfPath &newPath) |
Adds an edit operation to move the composed property at the given path on this namespace editor's stage to instead be at the path newPath . | |
USD_API bool | DeleteProperty (const UsdProperty &property) |
Adds an edit operation to delete the composed property at the path of property from this namespace editor's stage. | |
USD_API bool | RenameProperty (const UsdProperty &property, const TfToken &newName) |
Adds an edit operation to rename the composed property at the path of property on this namespace editor's stage to instead have the name newName . | |
USD_API bool | ReparentProperty (const UsdProperty &property, const UsdPrim &newParent) |
Adds an edit operation to reparent the composed property at the path of property on this namespace editor's stage to instead be a namespace child of the composed property at the path of newParent . | |
USD_API bool | ReparentProperty (const UsdProperty &property, const UsdPrim &newParent, const TfToken &newName) |
Adds an edit operation to reparent the composed property at the path of property on this namespace editor's stage to instead be a property named newName that is a namespace child of the composed prim at the path of newParent . | |
USD_API bool | ApplyEdits () |
Applies all the added namespace edits stored in this to namespace editor to its stage by authoring all scene description in the layer stack of the current edit target necessary to move or delete the composed objects that the edit paths refer to. | |
USD_API bool | CanApplyEdits (std::string *whyNot=nullptr) const |
Returns whether all the added namespace edits stored in this to namespace editor can be applied to its stage. | |
Dependent Stages | |
Dependent stages are additional stages that may have composition dependencies on the layer edits made for the editor's primary stage. By adding dependent stages, the editor can make additional edits so that affected composition arcs and specs that depend on affected composition in composed prims on these stages are updated to compose with the moved prim specs or, in the case of deletions, removed when the specs they depend on are removed. Dependencies in the dependent stages are based only what is currently loaded for those stages. In other words, the editor cannot find and edit dependencies from unloaded payloads, inactive prim children, prims that are load mask filtered, unselected variants, etc. The primary stage of this editor is always a dependent stage, meaning that edits will always be made to maintain affected composition dependencies in the primary stage. | |
USD_API void | AddDependentStage (const UsdStageRefPtr &stage) |
Adds the given stage as a dependent stage of this namespace editor. | |
USD_API void | RemoveDependentStage (const UsdStageRefPtr &stage) |
Removes the given stage as a dependent stage of this namespace editor. | |
USD_API void | SetDependentStages (const UsdStageRefPtrVector &stages) |
Sets the list of dependent stages for this namespace editor to stages . | |
Provides namespace editing operations
Definition at line 26 of file namespaceEditor.h.
struct UsdNamespaceEditor::EditOptions |
Structure for holding the options for how the namespace editor will behave when trying to perform edits.
Definition at line 31 of file namespaceEditor.h.
USD_API void AddDependentStage | ( | const UsdStageRefPtr & | stage | ) |
Adds the given stage
as a dependent stage of this namespace editor.
USD_API bool ApplyEdits | ( | ) |
Applies all the added namespace edits stored in this to namespace editor to its stage by authoring all scene description in the layer stack of the current edit target necessary to move or delete the composed objects that the edit paths refer to.
Returns true if all the necessary edits are successfully performed; returns false and emits a coding error otherwise.
USD_API bool CanApplyEdits | ( | std::string * | whyNot = nullptr | ) | const |
Returns whether all the added namespace edits stored in this to namespace editor can be applied to its stage.
In other words, this returns whether ApplyEdits should be successful if it were called right now. If this would return false and whyNot
is provided, the reasons ApplyEdits would fail will be copied to whyNot.
USD_API bool DeletePrim | ( | const UsdPrim & | prim | ) |
Adds an edit operation to delete the composed prim at the path of prim
from this namespace editor's stage.
This is equivalent to calling DeletePrimAtPath(prim.GetPath())
Returns true if the prim provides a valid possible composed prim path; returns false and emits a coding error if not.
USD_API bool DeletePrimAtPath | ( | const SdfPath & | path | ) |
Adds an edit operation to delete the composed prim at the given path
from this namespace editor's stage.
Returns true if the path is a valid possible composed prim path; returns false and emits a coding error if not.
USD_API bool DeleteProperty | ( | const UsdProperty & | property | ) |
Adds an edit operation to delete the composed property at the path of property
from this namespace editor's stage.
This is equivalent to calling DeletePropertyAtPath(property.GetPath())
Returns true if the property provides a valid possible composed property path; returns false and emits a coding error if not.
USD_API bool DeletePropertyAtPath | ( | const SdfPath & | path | ) |
Adds an edit operation to delete the composed property at the given path
from this namespace editor's stage.
Returns true if the path is a valid possible composed property path; returns false and emits a coding error if not.
Adds an edit operation to move the composed prim at the given path
on this namespace editor's stage to instead be at the path newPath
.
Returns true if both paths are valid possible composed prim path; returns false and emits a coding error if not.
Adds an edit operation to move the composed property at the given path
on this namespace editor's stage to instead be at the path newPath
.
Returns true if both paths are valid possible composed property path; returns false and emits a coding error if not.
USD_API void RemoveDependentStage | ( | const UsdStageRefPtr & | stage | ) |
Removes the given stage
as a dependent stage of this namespace editor.
Adds an edit operation to rename the composed prim at the path of prim
on this namespace editor's stage to instead have the name newName
.
Returns true if the prim provides a valid possible composed prim path and the new name is a valid possible prim name; returns false and emits a coding error if not.
USD_API bool RenameProperty | ( | const UsdProperty & | property, |
const TfToken & | newName | ||
) |
Adds an edit operation to rename the composed property at the path of property
on this namespace editor's stage to instead have the name newName
.
Returns true if the property provides a valid possible composed property path and the new name is a valid possible property name; returns false and emits a coding error if not.
Adds an edit operation to reparent the composed prim at the path of prim
on this namespace editor's stage to instead be a namespace child of the composed prim at the path of newParent
.
Returns true if the both the prim and the new parent prim provide a valid possible composed prim paths; returns false and emits a coding error if not.
USD_API bool ReparentPrim | ( | const UsdPrim & | prim, |
const UsdPrim & | newParent, | ||
const TfToken & | newName | ||
) |
Adds an edit operation to reparent the composed prim at the path of prim
on this namespace editor's stage to instead be a prim named newName
that is a namespace child of the composed prim at the
path of newParent
.
Returns true if the both the prim and the new parent prim provide a valid possible composed prim paths and the new name is a valid prim name; returns false and emits a coding error if not.
USD_API bool ReparentProperty | ( | const UsdProperty & | property, |
const UsdPrim & | newParent | ||
) |
Adds an edit operation to reparent the composed property at the path of property
on this namespace editor's stage to instead be a namespace child of the composed property at the path of newParent
.
Returns true if the both the property and the new parent prim provide a valid possible composed paths; returns false and emits a coding error if not.
USD_API bool ReparentProperty | ( | const UsdProperty & | property, |
const UsdPrim & | newParent, | ||
const TfToken & | newName | ||
) |
Adds an edit operation to reparent the composed property at the path of property
on this namespace editor's stage to instead be a property named newName
that is a namespace child of the composed prim at the path of newParent
.
Returns true if the both the property and the new parent prim provide a valid possible composed paths and the new name is a valid property name; returns false and emits a coding error if not.
USD_API void SetDependentStages | ( | const UsdStageRefPtrVector & | stages | ) |
Sets the list of dependent stages for this namespace editor to stages
.