Files
test/source/blender/python/mathutils/mathutils_Euler.hh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.5 KiB
C++
Raw Permalink Normal View History

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
2012-04-30 14:24:11 +00:00
#pragma once
/** \file
* \ingroup pymathutils
2011-02-27 20:10:08 +00:00
*/
#include <Python.h>
#include "mathutils.hh"
extern PyTypeObject euler_Type;
#define EulerObject_Check(v) PyObject_TypeCheck((v), &euler_Type)
#define EulerObject_CheckExact(v) (Py_TYPE(v) == &euler_Type)
struct EulerObject {
BASE_MATH_MEMBERS(eul);
unsigned char order; /* rotation order */
};
2012-03-03 20:36:09 +00:00
/* struct data contains a pointer to the actual data that the
* object uses. It can use either PyMem allocated data (which will
* be stored in py_data) or be a wrapper for data allocated through
* blender (stored in blend_data). This is an either/or struct not both */
2012-10-20 20:20:02 +00:00
/* prototypes */
[[nodiscard]] PyObject *Euler_CreatePyObject(const float eul[3],
short order,
PyTypeObject *base_type);
[[nodiscard]] PyObject *Euler_CreatePyObject_wrap(float eul[3],
short order,
PyTypeObject *base_type) ATTR_NONNULL(1);
[[nodiscard]] PyObject *Euler_CreatePyObject_cb(PyObject *cb_user,
short order,
unsigned char cb_type,
unsigned char cb_subtype);
[[nodiscard]] short euler_order_from_string(const char *str, const char *error_prefix);