diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/datafiles/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/editors/include/UI_icons.h | 4 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 13 |
3 files changed, 16 insertions, 2 deletions
diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt index d58bbec01cd..e820423cdff 100644 --- a/source/blender/editors/datafiles/CMakeLists.txt +++ b/source/blender/editors/datafiles/CMakeLists.txt @@ -191,7 +191,6 @@ set(ICON_NAMES library_data_broken boids strands - library_data_indirect greasepencil line_data library_data_override diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index a560208ac1e..8607c6d242c 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -246,7 +246,7 @@ DEF_ICON(RENDER_STILL) DEF_ICON(LIBRARY_DATA_BROKEN) DEF_ICON(BOIDS) DEF_ICON(STRANDS) -DEF_ICON(LIBRARY_DATA_INDIRECT) +DEF_ICON_BLANK(263) DEF_ICON(GREASEPENCIL) DEF_ICON_SHADING(LINE_DATA) DEF_ICON(LIBRARY_DATA_OVERRIDE) @@ -981,6 +981,8 @@ DEF_ICON_VECTOR(SEQUENCE_COLOR_07) DEF_ICON_VECTOR(SEQUENCE_COLOR_08) DEF_ICON_VECTOR(SEQUENCE_COLOR_09) +DEF_ICON_VECTOR(LIBRARY_DATA_INDIRECT) + /* Events. */ DEF_ICON_COLOR(EVENT_A) DEF_ICON_COLOR(EVENT_B) diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 07e4f6c2a24..887781beda1 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -465,6 +465,17 @@ DEF_ICON_STRIP_COLOR_DRAW(09, SEQUENCE_COLOR_09); # undef DEF_ICON_STRIP_COLOR_DRAW +# define ICON_INDIRECT_DATA_ALPHA 0.6f + +static void vicon_strip_color_draw_library_data_indirect( + int x, int y, int w, int UNUSED(h), float alpha) +{ + const float aspect = (float)ICON_DEFAULT_WIDTH / (float)w; + + UI_icon_draw_ex( + x, y, ICON_LIBRARY_DATA_DIRECT, aspect, ICON_INDIRECT_DATA_ALPHA * alpha, 0.0f, NULL, false); +} + /* Dynamically render icon instead of rendering a plain color to a texture/buffer * This is not strictly a "vicon", as it needs access to icon->obj to get the color info, * but it works in a very similar way. @@ -974,6 +985,8 @@ static void init_internal_icons(void) def_internal_vicon(ICON_SEQUENCE_COLOR_07, vicon_strip_color_draw_07); def_internal_vicon(ICON_SEQUENCE_COLOR_08, vicon_strip_color_draw_08); def_internal_vicon(ICON_SEQUENCE_COLOR_09, vicon_strip_color_draw_09); + + def_internal_vicon(ICON_LIBRARY_DATA_INDIRECT, vicon_strip_color_draw_library_data_indirect); } static void init_iconfile_list(struct ListBase *list) |