Blender V4.3
mathutils_Color.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
9#pragma once
10
11extern PyTypeObject color_Type;
12#define ColorObject_Check(v) PyObject_TypeCheck((v), &color_Type)
13#define ColorObject_CheckExact(v) (Py_TYPE(v) == &color_Type)
14
18
19/* struct data contains a pointer to the actual data that the
20 * object uses. It can use either PyMem allocated data (which will
21 * be stored in py_data) or be a wrapper for data allocated through
22 * Blender (stored in blend_data). This is an either/or struct not both. */
23
24/* Prototypes. */
25
26PyObject *Color_CreatePyObject(const float col[3],
27 PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT;
28PyObject *Color_CreatePyObject_wrap(float col[3], PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
29 ATTR_NONNULL(1);
30PyObject *Color_CreatePyObject_cb(PyObject *cb_user,
31 unsigned char cb_type,
32 unsigned char cb_subtype) ATTR_WARN_UNUSED_RESULT;
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_NONNULL(...)
uint col
PyTypeObject color_Type
PyObject * Color_CreatePyObject_wrap(float col[3], PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
PyObject * Color_CreatePyObject(const float col[3], PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT
PyObject * Color_CreatePyObject_cb(PyObject *cb_user, unsigned char cb_type, unsigned char cb_subtype) ATTR_WARN_UNUSED_RESULT
BASE_MATH_MEMBERS(col)