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_icons.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_icons.h')
-rw-r--r-- | source/blender/editors/include/UI_icons.h | 136 |
1 files changed, 84 insertions, 52 deletions
diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index 68c2044f95c..d6abfe6026a 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -30,6 +30,26 @@ /* Note: this is included multiple times with different #defines for DEF_ICON. */ +/* Auto define more specific types for places that do not need the distinction. */ +#ifndef DEF_ICON_COLLECTION + #define DEF_ICON_COLLECTION DEF_ICON +#endif +#ifndef DEF_ICON_OBJECT + #define DEF_ICON_OBJECT DEF_ICON +#endif +#ifndef DEF_ICON_OBJECT_DATA + #define DEF_ICON_OBJECT_DATA DEF_ICON +#endif +#ifndef DEF_ICON_MODIFIER + #define DEF_ICON_MODIFIER DEF_ICON +#endif +#ifndef DEF_ICON_SHADING + #define DEF_ICON_SHADING DEF_ICON +#endif +#ifndef DEF_ICON_COLOR + #define DEF_ICON_COLOR DEF_ICON +#endif + /* ICON_ prefix added */ DEF_ICON_COLOR(NONE) DEF_ICON(QUESTION) @@ -115,17 +135,17 @@ DEF_ICON(FULLSCREEN_EXIT) DEF_ICON(ONIONSKIN) /* BUTTONS */ -DEF_ICON(LIGHT) -DEF_ICON(MATERIAL) -DEF_ICON(TEXTURE) +DEF_ICON_SHADING(LIGHT) +DEF_ICON_SHADING(MATERIAL) +DEF_ICON_SHADING(TEXTURE) DEF_ICON(ANIM) -DEF_ICON(WORLD) +DEF_ICON_SHADING(WORLD) DEF_ICON(SCENE) DEF_ICON(EDIT) DEF_ICON(GAME) DEF_ICON(RADIO) DEF_ICON_COLOR(SCRIPT) -DEF_ICON(PARTICLES) +DEF_ICON_MODIFIER(PARTICLES) DEF_ICON(PHYSICS) DEF_ICON(SPEAKER) DEF_ICON(TEXTURE_SHADED) @@ -200,34 +220,34 @@ DEF_ICON_BLANK(77b) /* DATA */ DEF_ICON(SCENE_DATA) DEF_ICON(RENDERLAYERS) -DEF_ICON(WORLD_DATA) +DEF_ICON_SHADING(WORLD_DATA) DEF_ICON(OBJECT_DATA) DEF_ICON(MESH_DATA) DEF_ICON(CURVE_DATA) DEF_ICON(META_DATA) DEF_ICON(LATTICE_DATA) -DEF_ICON(LIGHT_DATA) -DEF_ICON(MATERIAL_DATA) -DEF_ICON(TEXTURE_DATA) +DEF_ICON_SHADING(LIGHT_DATA) +DEF_ICON_SHADING(MATERIAL_DATA) +DEF_ICON_SHADING(TEXTURE_DATA) DEF_ICON(ANIM_DATA) DEF_ICON(CAMERA_DATA) DEF_ICON(PARTICLE_DATA) DEF_ICON(LIBRARY_DATA_DIRECT) -DEF_ICON(GROUP) +DEF_ICON_COLLECTION(GROUP) DEF_ICON(ARMATURE_DATA) DEF_ICON(POSE_DATA) DEF_ICON(BONE_DATA) -DEF_ICON(CONSTRAINT) +DEF_ICON_MODIFIER(CONSTRAINT) DEF_ICON_COLOR(SHAPEKEY_DATA) -DEF_ICON(CONSTRAINT_BONE) +DEF_ICON_MODIFIER(CONSTRAINT_BONE) DEF_ICON(CAMERA_STEREO) DEF_ICON(PACKAGE) DEF_ICON(UGLYPACKAGE) DEF_ICON_BLANK(79b) /* DATA */ -DEF_ICON(BRUSH_DATA) -DEF_ICON(IMAGE_DATA) +DEF_ICON_SHADING(BRUSH_DATA) +DEF_ICON_SHADING(IMAGE_DATA) DEF_ICON(FILE) DEF_ICON(FCURVE) DEF_ICON(FONT_DATA) @@ -242,7 +262,7 @@ DEF_ICON_COLOR(BOIDS) DEF_ICON(STRANDS) DEF_ICON(LIBRARY_DATA_INDIRECT) DEF_ICON(GREASEPENCIL) -DEF_ICON(LINE_DATA) +DEF_ICON_SHADING(LINE_DATA) DEF_ICON_COLOR(LIBRARY_DATA_OVERRIDE) DEF_ICON(GROUP_BONE) DEF_ICON(GROUP_VERTEX) @@ -282,22 +302,22 @@ DEF_ICON(SYSTEM) DEF_ICON(SETTINGS) /* OUTLINER */ -DEF_ICON(OUTLINER_OB_EMPTY) -DEF_ICON(OUTLINER_OB_MESH) -DEF_ICON(OUTLINER_OB_CURVE) -DEF_ICON(OUTLINER_OB_LATTICE) -DEF_ICON(OUTLINER_OB_META) -DEF_ICON(OUTLINER_OB_LIGHT) -DEF_ICON(OUTLINER_OB_CAMERA) -DEF_ICON(OUTLINER_OB_ARMATURE) -DEF_ICON(OUTLINER_OB_FONT) -DEF_ICON(OUTLINER_OB_SURFACE) -DEF_ICON(OUTLINER_OB_SPEAKER) -DEF_ICON(OUTLINER_OB_FORCE_FIELD) -DEF_ICON(OUTLINER_OB_GROUP_INSTANCE) -DEF_ICON(OUTLINER_OB_GREASEPENCIL) -DEF_ICON(OUTLINER_OB_LIGHTPROBE) -DEF_ICON(OUTLINER_OB_IMAGE) +DEF_ICON_OBJECT(OUTLINER_OB_EMPTY) +DEF_ICON_OBJECT(OUTLINER_OB_MESH) +DEF_ICON_OBJECT(OUTLINER_OB_CURVE) +DEF_ICON_OBJECT(OUTLINER_OB_LATTICE) +DEF_ICON_OBJECT(OUTLINER_OB_META) +DEF_ICON_OBJECT(OUTLINER_OB_LIGHT) +DEF_ICON_OBJECT(OUTLINER_OB_CAMERA) +DEF_ICON_OBJECT(OUTLINER_OB_ARMATURE) +DEF_ICON_OBJECT(OUTLINER_OB_FONT) +DEF_ICON_OBJECT(OUTLINER_OB_SURFACE) +DEF_ICON_OBJECT(OUTLINER_OB_SPEAKER) +DEF_ICON_OBJECT(OUTLINER_OB_FORCE_FIELD) +DEF_ICON_OBJECT(OUTLINER_OB_GROUP_INSTANCE) +DEF_ICON_OBJECT(OUTLINER_OB_GREASEPENCIL) +DEF_ICON_OBJECT(OUTLINER_OB_LIGHTPROBE) +DEF_ICON_OBJECT(OUTLINER_OB_IMAGE) DEF_ICON_BLANK(125) DEF_ICON(RESTRICT_COLOR_OFF) DEF_ICON(RESTRICT_COLOR_ON) @@ -311,19 +331,19 @@ DEF_ICON_BLANK(127b) /* OUTLINER */ DEF_ICON_BLANK(128) -DEF_ICON(OUTLINER_DATA_MESH) -DEF_ICON(OUTLINER_DATA_CURVE) -DEF_ICON(OUTLINER_DATA_LATTICE) -DEF_ICON(OUTLINER_DATA_META) -DEF_ICON(OUTLINER_DATA_LIGHT) -DEF_ICON(OUTLINER_DATA_CAMERA) -DEF_ICON(OUTLINER_DATA_ARMATURE) -DEF_ICON(OUTLINER_DATA_FONT) -DEF_ICON(OUTLINER_DATA_SURFACE) -DEF_ICON(OUTLINER_DATA_SPEAKER) -DEF_ICON(OUTLINER_DATA_POSE) +DEF_ICON_OBJECT_DATA(OUTLINER_DATA_MESH) +DEF_ICON_OBJECT_DATA(OUTLINER_DATA_CURVE) +DEF_ICON_OBJECT_DATA(OUTLINER_DATA_LATTICE) +DEF_ICON_OBJECT_DATA(OUTLINER_DATA_META) +DEF_ICON_OBJECT_DATA(OUTLINER_DATA_LIGHT) +DEF_ICON_OBJECT_DATA(OUTLINER_DATA_CAMERA) +DEF_ICON_OBJECT_DATA(OUTLINER_DATA_ARMATURE) +DEF_ICON_OBJECT_DATA(OUTLINER_DATA_FONT) +DEF_ICON_OBJECT_DATA(OUTLINER_DATA_SURFACE) +DEF_ICON_OBJECT_DATA(OUTLINER_DATA_SPEAKER) +DEF_ICON_OBJECT_DATA(OUTLINER_DATA_POSE) DEF_ICON_BLANK(130) -DEF_ICON(OUTLINER_DATA_GREASEPENCIL) +DEF_ICON_OBJECT_DATA(OUTLINER_DATA_GREASEPENCIL) DEF_ICON_BLANK(132) DEF_ICON_BLANK(133) DEF_ICON_BLANK(134) @@ -350,11 +370,11 @@ DEF_ICON(MESH_TORUS) DEF_ICON(MESH_CONE) DEF_ICON(MESH_CAPSULE) DEF_ICON_BLANK(611) -DEF_ICON(LIGHT_POINT) -DEF_ICON(LIGHT_SUN) -DEF_ICON(LIGHT_SPOT) -DEF_ICON(LIGHT_HEMI) -DEF_ICON(LIGHT_AREA) +DEF_ICON_SHADING(LIGHT_POINT) +DEF_ICON_SHADING(LIGHT_SUN) +DEF_ICON_SHADING(LIGHT_SPOT) +DEF_ICON_SHADING(LIGHT_HEMI) +DEF_ICON_SHADING(LIGHT_AREA) DEF_ICON_BLANK(617) DEF_ICON_BLANK(618) DEF_ICON_COLOR(META_EMPTY) @@ -380,9 +400,9 @@ DEF_ICON(CURVE_BEZCIRCLE) DEF_ICON(CURVE_NCURVE) DEF_ICON(CURVE_NCIRCLE) DEF_ICON(CURVE_PATH) -DEF_ICON(LIGHTPROBE_CUBEMAP) -DEF_ICON(LIGHTPROBE_PLANAR) -DEF_ICON(LIGHTPROBE_GRID) +DEF_ICON_SHADING(LIGHTPROBE_CUBEMAP) +DEF_ICON_SHADING(LIGHTPROBE_PLANAR) +DEF_ICON_SHADING(LIGHTPROBE_GRID) DEF_ICON_BLANK(647) DEF_ICON_BLANK(648) DEF_ICON(COLOR_RED) @@ -506,7 +526,7 @@ DEF_ICON_BLANK(784) DEF_ICON_BLANK(785) /* MODIFIERS */ -DEF_ICON(MODIFIER) +DEF_ICON_MODIFIER(MODIFIER) DEF_ICON_COLOR(MOD_WAVE) DEF_ICON_COLOR(MOD_BUILD) DEF_ICON_COLOR(MOD_DECIM) @@ -1034,3 +1054,15 @@ DEF_ICON_COLOR(EVENT_HOME) DEF_ICON_COLOR(EVENT_END) DEF_ICON_COLOR(EVENT_RETURN) /* add as needed. */ + +/* Undefine all types. */ + +#undef DEF_ICON +#undef DEF_ICON_COLLECTION +#undef DEF_ICON_OBJECT +#undef DEF_ICON_OBJECT_DATA +#undef DEF_ICON_MODIFIER +#undef DEF_ICON_SHADING +#undef DEF_ICON_VECTOR +#undef DEF_ICON_COLOR +#undef DEF_ICON_BLANK |