Blender V4.5
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
31PyObject *Euler_CreatePyObject(const float eul[3],
32 short order,
33 PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT;
34PyObject *Euler_CreatePyObject_wrap(float eul[3],
35 short order,
36 PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
37 ATTR_NONNULL(1);
38PyObject *Euler_CreatePyObject_cb(PyObject *cb_user,
39 short order,
40 unsigned char cb_type,
41 unsigned char cb_subtype) ATTR_WARN_UNUSED_RESULT;
42
43short euler_order_from_string(const char *str, const char *error_prefix);
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_NONNULL(...)
#define str(s)
PyTypeObject euler_Type
PyObject * Euler_CreatePyObject(const float eul[3], short order, PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
short euler_order_from_string(const char *str, const char *error_prefix)
PyObject * Euler_CreatePyObject_cb(PyObject *cb_user, short order, unsigned char cb_type, unsigned char cb_subtype) ATTR_WARN_UNUSED_RESULT
PyObject * Euler_CreatePyObject_wrap(float eul[3], short order, PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
unsigned char order
BASE_MATH_MEMBERS(eul)