From d3813b159ac2d0c32e25417aef7ea33d9234800a Mon Sep 17 00:00:00 2001 From: Sean Kim Date: Fri, 19 Apr 2024 17:15:41 -0700 Subject: [PATCH] Add toolbar.blend update instructions --- docs/features/interface/icons.md | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/docs/features/interface/icons.md b/docs/features/interface/icons.md index 5f8b32c1..be2a0ca2 100644 --- a/docs/features/interface/icons.md +++ b/docs/features/interface/icons.md @@ -168,12 +168,32 @@ You can find the sources of these icons in `release/datafiles/assets/icons/toolb This is the [blender-assets](https://projects.blender.org/blender/blender-assets) repository, used as a Git submodule in the Blender repository. -To create the actual icons, follow the built-in `README.txt` inside -`toolbar.blend`. This will guide you through creating the icon mesh -correctly. +### Creating / Modifying New Icons +- Object names are used to generate filenames: e.g. `ops.gpencil.draw.eraser` + will be written to `${BLENDER}/release/datafiles/icons/ops.gpencil.draw.eraser.dat` +- An objects children are recursively included when exporting to allow easily sharing + geometry between icons. -Once you do the geometry in Blender, you can transform it into a .dat -file with the command: `make icons_geom` + These may be transformed as long as they remain in the icon bounds. +- Material colors are multiplied by vertex colors when exporting. +- Geometry depth is used so closer faces draw on top. +- Vertex alpha can be used. +- Try to keep the file well organized. + +### Exporting Icons + +#### Requirements +- Objects must be meshes to be exported +- Icon objects and any shared children must be in the **Export** collection to be considered for exporting. +- Icon detail should be kept low since more complex icons will take more time to draw (while cached, + avoid unnecessary overhead). + +After the file has been committed to the `blender-assets` repository, the icons can be generated +for use inside Blender via the following process. + +- Run: `make icons_geom` +- Commit: `${BLENDER}/release/datafiles/icons/.dat` and + `${BLENDER}/source/blender/editors/datafiles/CMakeLists.txt` ## Built-in Assets -- 2.30.2