Blender V4.3
bpy_app_icons.cc File Reference
#include <Python.h>
#include "MEM_guardedalloc.h"
#include "BLI_utildefines.h"
#include "BKE_icons.h"
#include "../generic/py_capi_utils.hh"
#include "../generic/python_compat.hh"
#include "bpy_app_icons.hh"

Go to the source code of this file.

Functions

 PyDoc_STRVAR (bpy_app_icons_new_triangles_doc, ".. function:: new_triangles(range, coords, colors)\n" "\n" " Create a new icon from triangle geometry.\n" "\n" " :arg range: Pair of ints.\n" " :type range: tuple[int, int]\n" " :arg coords: Sequence of bytes (6 floats for one triangle) for (X, Y) coordinates.\n" " :type coords: bytes\n" " :arg colors: Sequence of bytes (12 for one triangles) for RGBA.\n" " :type colors: bytes\n" " :return: Unique icon value (pass to interface ``icon_value`` argument).\n" " :rtype: int\n")
 
static PyObject * bpy_app_icons_new_triangles (PyObject *, PyObject *args, PyObject *kw)
 
 PyDoc_STRVAR (bpy_app_icons_new_triangles_from_file_doc, ".. function:: new_triangles_from_file(filepath)\n" "\n" " Create a new icon from triangle geometry.\n" "\n" " :arg filepath: File path.\n" " :type filepath: str | bytes.\n" " :return: Unique icon value (pass to interface ``icon_value`` argument).\n" " :rtype: int\n")
 
static PyObject * bpy_app_icons_new_triangles_from_file (PyObject *, PyObject *args, PyObject *kw)
 
 PyDoc_STRVAR (bpy_app_icons_release_doc, ".. function:: release(icon_id)\n" "\n" " Release the icon.\n")
 
static PyObject * bpy_app_icons_release (PyObject *, PyObject *args, PyObject *kw)
 
PyObject * BPY_app_icons_module ()
 

Variables

static PyMethodDef M_AppIcons_methods []
 
static PyModuleDef M_AppIcons_module_def
 

Detailed Description

Runtime defined icons.

Definition in file bpy_app_icons.cc.

Function Documentation

◆ BPY_app_icons_module()

PyObject * BPY_app_icons_module ( )

Definition at line 199 of file bpy_app_icons.cc.

References M_AppIcons_module_def, and mod().

Referenced by make_app_info().

◆ bpy_app_icons_new_triangles()

static PyObject * bpy_app_icons_new_triangles ( PyObject * ,
PyObject * args,
PyObject * kw )
static

◆ bpy_app_icons_new_triangles_from_file()

static PyObject * bpy_app_icons_new_triangles_from_file ( PyObject * ,
PyObject * args,
PyObject * kw )
static

◆ bpy_app_icons_release()

static PyObject * bpy_app_icons_release ( PyObject * ,
PyObject * args,
PyObject * kw )
static

Definition at line 140 of file bpy_app_icons.cc.

References BKE_icon_delete_unmanaged(), and PY_ARG_PARSER_HEAD_COMPAT.

◆ PyDoc_STRVAR() [1/3]

PyDoc_STRVAR ( bpy_app_icons_new_triangles_doc ,
".. function:: new_triangles(range, coords, colors)\n" "\n" " Create a new icon from triangle geometry.\n" "\n" " :arg range: Pair of ints.\n" " :type range: tuple\n" " :arg coords: Sequence of bytes (6 floats for one triangle) for (X, Y) coordinates.\n" " :type coords: bytes\n" " :arg colors: Sequence of bytes (12 for one triangles) for RGBA.\n" " :type colors: bytes\n" " :return: Unique icon value (pass to interface ``icon_value`` argument).\n" " :rtype: int\n" [int, int] )

◆ PyDoc_STRVAR() [2/3]

PyDoc_STRVAR ( bpy_app_icons_new_triangles_from_file_doc ,
".. function:: new_triangles_from_file(filepath)\n" "\n" " Create a new icon from triangle geometry.\n" "\n" " :arg filepath: File path.\n" " :type filepath: str | bytes.\n" " :return: Unique icon value (pass to interface ``icon_value`` argument).\n" " :rtype: int\n"  )

◆ PyDoc_STRVAR() [3/3]

PyDoc_STRVAR ( bpy_app_icons_release_doc ,
".. function:: release(icon_id)\n" "\n" " Release the icon.\n"  )

Variable Documentation

◆ M_AppIcons_methods

PyMethodDef M_AppIcons_methods[]
static
Initial value:
= {
{"new_triangles",
METH_VARARGS | METH_KEYWORDS,
bpy_app_icons_new_triangles_doc},
{"new_triangles_from_file",
METH_VARARGS | METH_KEYWORDS,
bpy_app_icons_new_triangles_from_file_doc},
{"release",
(PyCFunction)bpy_app_icons_release,
METH_VARARGS | METH_KEYWORDS,
bpy_app_icons_release_doc},
{nullptr, nullptr, 0, nullptr},
}
static PyObject * bpy_app_icons_new_triangles(PyObject *, PyObject *args, PyObject *kw)
static PyObject * bpy_app_icons_release(PyObject *, PyObject *args, PyObject *kw)
static PyObject * bpy_app_icons_new_triangles_from_file(PyObject *, PyObject *args, PyObject *kw)

Definition at line 167 of file bpy_app_icons.cc.

◆ M_AppIcons_module_def

PyModuleDef M_AppIcons_module_def
static
Initial value:
= {
PyModuleDef_HEAD_INIT,
"bpy.app.icons",
nullptr,
0,
nullptr,
nullptr,
nullptr,
nullptr,
}
static PyMethodDef M_AppIcons_methods[]

Definition at line 187 of file bpy_app_icons.cc.

Referenced by BPY_app_icons_module().