Page MenuHome

Support for custom icon sheets
Needs ReviewPublic

Authored by Yevgeny Makarov (jenkm) on Mon, Sep 2, 10:28 AM.
Tags
None
Tokens
"Like" token, awarded by Fracture128."Like" token, awarded by amonpaike."Love" token, awarded by brilliant_ape.

Details

Summary

Support for user icon sheets.

The icons are searched in the (USER or SYSTEM) datafiles/icons directory.

Trying to load the blender_icons_16.png and blender_icons_32.png files.

Checking image dimensions against built-in icons, if the image not valid, the built-in icon sheet will be saved to the temporary directory, to be used as a reference.

Next checking the amount of bits/planes. Grayscale images with alpha channel (16 bit) will be ICON_TYPE_MONO_TEXTURE and RGBA images (32 bit) will be ICON_TYPE_COLOR_TEXTURE. Others bits (images without alpha channel) are being ignored.

If only one icons file is successfully loaded, it is used for all UI scales. If two files are loaded but different bits, only 32x32 version are used.

Various test files, including color, monochrome and invalid:

Based on the D4683 by @gsr b3d (gsrb3d).


Comparison of GL_TEXTURE_MIN_FILTER parameters, GL_LINEAR_MIPMAP_NEAREST vs GL_LINEAR_MIPMAP_LINEAR.

LINEAR vs NEAREST at a scale of 1.4x:

Various scales, new NEAREST on the left, old LINEAR on the right:

Diff Detail

Repository
rB Blender

Event Timeline

Yevgeny Makarov (jenkm) planned changes to this revision.Wed, Sep 11, 4:55 PM
Yevgeny Makarov (jenkm) retitled this revision from Support for custom user icon sheets to Support for custom icon sheets.Mon, Sep 16, 9:38 AM
Yevgeny Makarov (jenkm) edited the summary of this revision. (Show Details)
Yevgeny Makarov (jenkm) updated this revision to Diff 18255.
Yevgeny Makarov (jenkm) planned changes to this revision.Sat, Sep 21, 8:51 PM
Yevgeny Makarov (jenkm) edited the summary of this revision. (Show Details)Sun, Sep 22, 4:27 PM
Yevgeny Makarov (jenkm) updated this revision to Diff 18401.

Revert back to a simpler version without the "Icon Directory" theme option.