Blender  V3.3
mathutils_Color.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #pragma once
8 
9 extern PyTypeObject color_Type;
10 #define ColorObject_Check(v) PyObject_TypeCheck((v), &color_Type)
11 #define ColorObject_CheckExact(v) (Py_TYPE(v) == &color_Type)
12 
13 typedef struct {
15 } ColorObject;
16 
17 /* struct data contains a pointer to the actual data that the
18  * object uses. It can use either PyMem allocated data (which will
19  * be stored in py_data) or be a wrapper for data allocated through
20  * Blender (stored in blend_data). This is an either/or struct not both. */
21 
22 /* Prototypes. */
23 
24 PyObject *Color_CreatePyObject(const float col[3],
25  PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT;
26 PyObject *Color_CreatePyObject_wrap(float col[3], PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
27  ATTR_NONNULL(1);
28 PyObject *Color_CreatePyObject_cb(PyObject *cb_user,
29  unsigned char cb_type,
30  unsigned char cb_subtype) ATTR_WARN_UNUSED_RESULT;
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_NONNULL(...)
uint col
PyObject * Color_CreatePyObject_wrap(float col[3], PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
PyObject * Color_CreatePyObject_cb(PyObject *cb_user, unsigned char cb_type, unsigned char cb_subtype) ATTR_WARN_UNUSED_RESULT
PyTypeObject color_Type
PyObject * Color_CreatePyObject(const float col[3], PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
BASE_MATH_MEMBERS(col)