withEditTarget(layer:_:)
Performs the closure with the stage’s edit target set to author into the currently selected variant.
Declaration
func withEditTarget<R>(layer: USDLayer? = nil, _ body: (USDStage.EditTarget) throws -> R) rethrows -> RParameters
- layer:
The layer to target, or
nilfor the current edit target’s layer. - body:
A closure that performs edits within the variant.
Return Value
The value returned by body.
Discussion
The previous edit target is restored when the closure returns.