Blender V5.0
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
15extern PyTypeObject euler_Type;
16#define EulerObject_Check(v) PyObject_TypeCheck((v), &euler_Type)
17#define EulerObject_CheckExact(v) (Py_TYPE(v) == &euler_Type)
18
21 unsigned char order; /* rotation order */
22};
23
24/* struct data contains a pointer to the actual data that the
25 * object uses. It can use either PyMem allocated data (which will
26 * be stored in py_data) or be a wrapper for data allocated through
27 * blender (stored in blend_data). This is an either/or struct not both */
28
29/* prototypes */
30
31[[nodiscard]] PyObject *Euler_CreatePyObject(const float eul[3],
32 short order,
33 PyTypeObject *base_type);
34[[nodiscard]] PyObject *Euler_CreatePyObject_wrap(float eul[3],
35 short order,
36 PyTypeObject *base_type) ATTR_NONNULL(1);
37[[nodiscard]] PyObject *Euler_CreatePyObject_cb(PyObject *cb_user,
38 short order,
39 unsigned char cb_type,
40 unsigned char cb_subtype);
41
42[[nodiscard]] short euler_order_from_string(const char *str, const char *error_prefix);
#define ATTR_NONNULL(...)
#define str(s)
PyTypeObject euler_Type
short euler_order_from_string(const char *str, const char *error_prefix)
PyObject * Euler_CreatePyObject_wrap(float eul[3], short order, PyTypeObject *base_type) ATTR_NONNULL(1)
PyObject * Euler_CreatePyObject_cb(PyObject *cb_user, short order, unsigned char cb_type, unsigned char cb_subtype)
PyObject * Euler_CreatePyObject(const float eul[3], short order, PyTypeObject *base_type)
unsigned char order
BASE_MATH_MEMBERS(eul)