Loading...
Searching...
No Matches
arrayPyBuffer.h
1//
2// Copyright 2016 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_BASE_VT_ARRAY_PY_BUFFER_H
8#define PXR_BASE_VT_ARRAY_PY_BUFFER_H
9
10#include "pxr/pxr.h"
11#include "pxr/base/vt/api.h"
12#include "pxr/base/vt/array.h"
13#include "pxr/base/tf/pyObjWrapper.h"
14
15#include <optional>
16
17PXR_NAMESPACE_OPEN_SCOPE
18
25template <class T>
26std::optional<VtArray<T> >
27VtArrayFromPyBuffer(TfPyObjWrapper const &obj, std::string *err=nullptr);
28
30#define VT_ARRAY_PYBUFFER_TYPES \
31 VT_BUILTIN_NUMERIC_VALUE_TYPES \
32 VT_VEC_VALUE_TYPES \
33 VT_MATRIX_VALUE_TYPES \
34 VT_GFRANGE_VALUE_TYPES \
35 ((GfRect2i, Rect2i)) \
36 ((GfQuath, Quath)) \
37 ((GfQuatf, Quatf)) \
38 ((GfQuatd, Quatd)) \
39 ((GfDualQuath, DualQuath)) \
40 ((GfDualQuatf, DualQuatf)) \
41 ((GfDualQuatd, DualQuatd))
42
43
44PXR_NAMESPACE_CLOSE_SCOPE
45
46#endif // PXR_BASE_VT_ARRAY_PY_BUFFER_H
Boost Python object wrapper.
Definition: pyObjWrapper.h:79