Hello,
I wonder if this is possible to add a custom icon in the toolbar (WorkSpaceTool) for custom operator like it is possible with the preview_collections in other area of blender.
2 Likes
yursiv
December 14, 2020, 3:48pm
2
Yes it is possible
In: https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API/UI_DESIGN
At Toolbar Icons it’s speficied how to create your icons in the .blend file. But later the exporting process is very vague. In what directory you do need to be in order to run command:
./blender.bin \
icon_file.blend --background --python ./release/datafiles/blender_icons_geom.py -- \
--output-dir=./release/datafiles/blender_icons_geom
Anyone had any luck with this?
theme, development
You can generate them from .blend file with this script.
# SPDX-FileCopyrightText: 2018-2023 Blender Authors
#
# SPDX-License-Identifier: Apache-2.0
"""
Example Usage
=============
Command line::
./blender.bin \
icon_file.blend --background --python ./release/datafiles/blender_icons_geom.py -- \
--output-dir=./release/datafiles/blender_icons_geom
Icon Format
===========
This is a simple binary format (all bytes, so no endian).
The header is 8 bytes:
This file has been truncated. show original
Example .blend you can find in source repo.
1 Like