From 8ec25e5dccd21e25ea11336b88e14306ed2f77a0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 20 Apr 2018 15:25:18 +0200 Subject: UI: Python API defining dynamic icons Currently only able to define geometry icons. --- source/blender/python/intern/bpy_app.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/blender/python/intern/bpy_app.c') diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c index 1e2ce372727..f6e89ef38a5 100644 --- a/source/blender/python/intern/bpy_app.c +++ b/source/blender/python/intern/bpy_app.c @@ -47,6 +47,9 @@ #include "bpy_app_handlers.h" #include "bpy_driver.h" +/* modules */ +#include "bpy_app_icons.h" + #include "BLI_utildefines.h" #include "BKE_appdir.h" @@ -117,6 +120,9 @@ static PyStructSequence_Field app_info_fields[] = { {(char *)"build_options", (char *)"A set containing most important enabled optional build features"}, {(char *)"handlers", (char *)"Application handler callbacks"}, {(char *)"translations", (char *)"Application and addons internationalization API"}, + + /* Modules (not struct sequence). */ + {(char *)"icons", (char *)"Manage custom icons"}, {NULL}, }; @@ -129,6 +135,7 @@ PyDoc_STRVAR(bpy_app_doc, " :maxdepth: 1\n" "\n" " bpy.app.handlers.rst\n" +" bpy.app.icons.rst\n" " bpy.app.translations.rst\n" ); @@ -210,6 +217,9 @@ static PyObject *make_app_info(void) SetObjItem(BPY_app_handlers_struct()); SetObjItem(BPY_app_translations_struct()); + /* modules */ + SetObjItem(BPY_app_icons_module()); + #undef SetIntItem #undef SetStrItem #undef SetBytesItem -- cgit v1.2.3