HDK
|
#include <namespaceEditor.h>
Public Member Functions | |
USD_API | UsdNamespaceEditor (const UsdStageRefPtr &stage) |
USD_API bool | DeletePrimAtPath (const SdfPath &path) |
USD_API bool | MovePrimAtPath (const SdfPath &path, const SdfPath &newPath) |
USD_API bool | DeletePrim (const UsdPrim &prim) |
USD_API bool | RenamePrim (const UsdPrim &prim, const TfToken &newName) |
USD_API bool | ReparentPrim (const UsdPrim &prim, const UsdPrim &newParent) |
USD_API bool | ReparentPrim (const UsdPrim &prim, const UsdPrim &newParent, const TfToken &newName) |
USD_API bool | DeletePropertyAtPath (const SdfPath &path) |
USD_API bool | MovePropertyAtPath (const SdfPath &path, const SdfPath &newPath) |
USD_API bool | DeleteProperty (const UsdProperty &property) |
USD_API bool | RenameProperty (const UsdProperty &property, const TfToken &newName) |
USD_API bool | ReparentProperty (const UsdProperty &property, const UsdPrim &newParent) |
USD_API bool | ReparentProperty (const UsdProperty &property, const UsdPrim &newParent, const TfToken &newName) |
USD_API bool | ApplyEdits () |
USD_API bool | CanApplyEdits (std::string *whyNot=nullptr) const |
Provides namespace editing operations
Definition at line 43 of file namespaceEditor.h.
|
explicit |
USD_API bool UsdNamespaceEditor::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 UsdNamespaceEditor::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.
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.
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 UsdNamespaceEditor::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.
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.
USD_API bool UsdNamespaceEditor::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
.
Returns true if both paths are valid possible composed property path; returns false and emits a coding error if not.
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 UsdNamespaceEditor::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 UsdNamespaceEditor::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 UsdNamespaceEditor::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 UsdNamespaceEditor::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.