diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-10-02 20:04:38 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-10-08 20:46:00 +0300 |
commit | cf8e71db615c2d74bf87f18ab8389a675cbe6c51 (patch) | |
tree | 9f29f386985d521b4e28d644e4cd6e6d7e53015d /source/blender/editors/include/UI_resources.h | |
parent | 2ac65f6153a2da2df7cda908689bb7c1865f088d (diff) |
UI: add icon color coding for different data types in the outliner.
For now we have categories collection, object, object data, modifiers &
constraints, and shading. The icons can be categorized by adding e.g.
DEF_ICON_OBJECT() in UI_icons.h.
Light themes will need to be updated to use darker colors to keep icons
visible in the outliner.
Diffstat (limited to 'source/blender/editors/include/UI_resources.h')
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 6315a3daafa..1a8b7bb12af 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -29,11 +29,12 @@ * \ingroup editorui */ +#include "BLI_sys_types.h" + #ifndef __UI_RESOURCES_H__ #define __UI_RESOURCES_H__ -/* elubie: TODO: move the typedef for icons to UI_interface_icons.h */ -/* and add/replace include of UI_resources.h by UI_interface_icons.h */ +/* Define icon enum. */ #define DEF_ICON(name) ICON_##name, #define DEF_ICON_VECTOR(name) ICON_##name, #define DEF_ICON_COLOR(name) ICON_##name, @@ -47,11 +48,6 @@ typedef enum { #define BIFICONID_FIRST (ICON_NONE) -#undef DEF_ICON -#undef DEF_ICON_VECTOR -#undef DEF_ICON_COLOR -#undef DEF_ICON_BLANK - /* use to denote intentionally unset theme color */ #define TH_UNDEFINED -1 @@ -267,6 +263,12 @@ typedef enum ThemeColorID { TH_ANIM_INACTIVE, /* no active action */ TH_ANIM_PREVIEW_RANGE,/* preview range overlay */ + TH_ICON_COLLECTION, + TH_ICON_OBJECT, + TH_ICON_OBJECT_DATA, + TH_ICON_MODIFIER, + TH_ICON_SHADING, + TH_NLA_TWEAK, /* 'tweaking' track in NLA */ TH_NLA_TWEAK_DUPLI, /* error/warning flag for other strips referencing dupli strip */ @@ -366,6 +368,9 @@ void UI_GetThemeColor4ubv(int colorid, unsigned char col[4]); // get a theme color from specified space type void UI_GetThemeColorType4ubv(int colorid, int spacetype, char col[4]); +// get theme color for coloring monochrome icons +bool UI_GetIconThemeColor4fv(int colorid, float col[4]); + // shade a 3 byte color (same as UI_GetColorPtrBlendShade3ubv with 0.0 factor) void UI_GetColorPtrShade3ubv(const unsigned char cp1[3], unsigned char col[3], int offset); |