All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
pyEditContext.h
1//
2// Copyright 2017 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_USD_USD_PY_EDIT_CONTEXT_H
8#define PXR_USD_USD_PY_EDIT_CONTEXT_H
9
10#include "pxr/pxr.h"
11#include "pxr/usd/usd/api.h"
12#include "pxr/usd/usd/editContext.h"
13#include "pxr/usd/usd/editTarget.h"
14
15#include <memory>
16#include <utility>
17
18PXR_NAMESPACE_OPEN_SCOPE
19
21
22// Utility class for returning UsdEditContexts to python. For use in wrapping
23// code.
24struct UsdPyEditContext
25{
26 USD_API
27 explicit UsdPyEditContext(
28 const std::pair<UsdStagePtr, UsdEditTarget> &stageTarget);
29 USD_API
30 explicit UsdPyEditContext(const UsdStagePtr &stage,
31 const UsdEditTarget &editTarget=UsdEditTarget());
32private:
33 friend struct Usd_PyEditContextAccess;
34
35 UsdStagePtr _stage;
36 UsdEditTarget _editTarget;
37 std::shared_ptr<UsdEditContext> _editContext;
38};
39
40
41PXR_NAMESPACE_CLOSE_SCOPE
42
43#endif // PXR_USD_USD_PY_EDIT_CONTEXT_H
Defines a mapping from scene graph paths to Sdf spec paths in a SdfLayer where edits should be direct...
Definition: editTarget.h:64
The outermost container for scene description, which owns and presents composed prims as a scenegraph...
Definition: stage.h:136
#define TF_DECLARE_WEAK_PTRS(type)
Define standard weak pointer types.
Definition: declarePtrs.h:45