Blender V5.3
mathutils_Euler.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
10
11#include <Python.h>
12
13#include "mathutils.hh"
14
15namespace blender {
16
17extern PyTypeObject euler_Type;
18#define EulerObject_Check(v) PyObject_TypeCheck((v), &euler_Type)
19#define EulerObject_CheckExact(v) (Py_TYPE(v) == &euler_Type)
20
23 unsigned char order; /* rotation order */
24};
25
26/* struct data contains a pointer to the actual data that the
27 * object uses. It can use either PyMem allocated data (which will
28 * be stored in py_data) or be a wrapper for data allocated through
29 * blender (stored in blend_data). This is an either/or struct not both */
30
31/* prototypes */
32
33[[nodiscard]] PyObject *Euler_CreatePyObject(const float eul[3],
34 short order,
35 PyTypeObject *base_type);
36[[nodiscard]] PyObject *Euler_CreatePyObject_wrap(float eul[3],
37 short order,
38 PyTypeObject *base_type) ATTR_NONNULL(1);
39[[nodiscard]] PyObject *Euler_CreatePyObject_cb(PyObject *cb_user,
40 short order,
41 unsigned char cb_type,
42 unsigned char cb_subtype);
43
44[[nodiscard]] short euler_order_from_string(const char *str, const char *error_prefix);
45
46} // namespace blender
#define str(s)
BMesh Iterators.
PyObject * Euler_CreatePyObject(const float eul[3], const short order, PyTypeObject *base_type)
PyTypeObject euler_Type
short euler_order_from_string(const char *str, const char *error_prefix)
PyObject * Euler_CreatePyObject_wrap(float eul[3], const short order, PyTypeObject *base_type)
void ATTR_NONNULL(1, 2)
PyObject * Euler_CreatePyObject_cb(PyObject *cb_user, const short order, uchar cb_type, uchar cb_subtype)