This patch implements proposal: https://developer.blender.org/T37989
adds the ability to store uncompressed pixmaps in git so icons can be updated without increasing the repository by almost 1mb for any icon change.
The patch can is 2 parts.
- datatoc_icon_split.py - which splits the PNG into pixmaps (writing out pixmaps from a grid when they contain any non-transparent values). Only runs when updating icons.
- datatoc_icon.c - which runs at build time and converts the pixmaps into a PNG. (only when its needed).
Works for both CMake and SCons.
Current conventions for naming are taken from UI_icons.h eg:
- release/datafiles/blender_icons16/icon16_solid.dat
- release/datafiles/blender_icons16/icon16_render_animation.dat
This is optional, we can have XXxYY.dat naming too if we want to apply this to other files which dont have UI_icons.h header.
One thing that would be good to have is color comparisons so icons wont be updated if there are only very minor changes (as may happen between different systems or inkscape versions).
Note on applying patch
After applying the patch, run this to generate dat files for the first time:
cd release/datafiles ./blender_icons.sh
... to generate the data files.