Blender V4.3
mathutils_Quaternion.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
11extern PyTypeObject quaternion_Type;
12
13#define QuaternionObject_Check(v) PyObject_TypeCheck((v), &quaternion_Type)
14#define QuaternionObject_CheckExact(v) (Py_TYPE(v) == &quaternion_Type)
15
19
20/* struct data contains a pointer to the actual data that the
21 * object uses. It can use either PyMem allocated data (which will
22 * be stored in py_data) or be a wrapper for data allocated through
23 * blender (stored in blend_data). This is an either/or struct not both */
24
25/* Prototypes. */
26
27PyObject *Quaternion_CreatePyObject(const float quat[4],
28 PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT;
29PyObject *Quaternion_CreatePyObject_wrap(float quat[4],
30 PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
31 ATTR_NONNULL(1);
32PyObject *Quaternion_CreatePyObject_cb(PyObject *cb_user,
33 unsigned char cb_type,
34 unsigned char cb_subtype) ATTR_WARN_UNUSED_RESULT;
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_NONNULL(...)
PyObject * Quaternion_CreatePyObject(const float quat[4], PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
PyObject * Quaternion_CreatePyObject_cb(PyObject *cb_user, unsigned char cb_type, unsigned char cb_subtype) ATTR_WARN_UNUSED_RESULT
PyTypeObject quaternion_Type
PyObject * Quaternion_CreatePyObject_wrap(float quat[4], PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)