Blender V5.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
8
9#pragma once
10
11#include <Python.h>
12
13#include "mathutils.hh"
14
15namespace blender {
16
17extern PyTypeObject color_Type;
18#define ColorObject_Check(v) PyObject_TypeCheck((v), &color_Type)
19#define ColorObject_CheckExact(v) (Py_TYPE(v) == &color_Type)
20
24
25/* struct data contains a pointer to the actual data that the
26 * object uses. It can use either PyMem allocated data (which will
27 * be stored in py_data) or be a wrapper for data allocated through
28 * Blender (stored in blend_data). This is an either/or struct not both. */
29
30/* Prototypes. */
31
32[[nodiscard]] PyObject *Color_CreatePyObject(const float col[3], PyTypeObject *base_type);
33[[nodiscard]] PyObject *Color_CreatePyObject_wrap(float col[3], PyTypeObject *base_type)
34 ATTR_NONNULL(1);
35[[nodiscard]] PyObject *Color_CreatePyObject_cb(PyObject *cb_user,
36 unsigned char cb_type,
37 unsigned char cb_subtype);
38
39} // namespace blender
BMesh Iterators.
PyObject * Color_CreatePyObject(const float col[3], PyTypeObject *base_type)
PyTypeObject color_Type
PyObject * Color_CreatePyObject_cb(PyObject *cb_user, uchar cb_type, uchar cb_subtype)
void ATTR_NONNULL(1, 2)
PyObject * Color_CreatePyObject_wrap(float col[3], PyTypeObject *base_type)