Add toolbar.blend update instructions #50

Merged
Brecht Van Lommel merged 1 commits from Sean-Kim/blender-developer-docs:toolbar-blend-readme into main 2024-04-26 17:29:24 +02:00
Showing only changes of commit d3813b159a - Show all commits

View File

@ -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/<icon_name>.dat` and
`${BLENDER}/source/blender/editors/datafiles/CMakeLists.txt`
## Built-in Assets