mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Core: add icon for indirect packed data-blocks
This is similar to how indirectly linked data-blocks have a slightly dimmed icon. Pull Request: https://projects.blender.org/blender/blender/pulls/159166
This commit is contained in:
parent
af602ba283
commit
5d7403c8ce
2 changed files with 21 additions and 0 deletions
|
|
@ -958,6 +958,7 @@ DEF_ICON_VECTOR(STRIP_COLOR_09)
|
|||
|
||||
DEF_ICON_VECTOR(LIBRARY_DATA_INDIRECT)
|
||||
DEF_ICON_VECTOR(LIBRARY_DATA_OVERRIDE_NONEDITABLE)
|
||||
DEF_ICON_VECTOR(PACKAGE_INDIRECT)
|
||||
|
||||
DEF_ICON_VECTOR(LAYERGROUP_COLOR_01)
|
||||
DEF_ICON_VECTOR(LAYERGROUP_COLOR_02)
|
||||
|
|
|
|||
|
|
@ -534,6 +534,22 @@ static void vicon_strip_color_draw_library_data_indirect(
|
|||
UI_NO_ICON_OVERLAY_TEXT);
|
||||
}
|
||||
|
||||
static void vicon_strip_color_draw_package_indirect(
|
||||
float x, float y, float w, float /*h*/, float alpha, const uchar * /*mono_rgba[4]*/)
|
||||
{
|
||||
const float aspect = float(ICON_DEFAULT_WIDTH) / w;
|
||||
|
||||
icon_draw_ex(x,
|
||||
y,
|
||||
ICON_PACKAGE,
|
||||
aspect,
|
||||
ICON_INDIRECT_DATA_ALPHA * alpha,
|
||||
0.0f,
|
||||
nullptr,
|
||||
false,
|
||||
UI_NO_ICON_OVERLAY_TEXT);
|
||||
}
|
||||
|
||||
static void vicon_strip_color_draw_library_data_override_noneditable(
|
||||
float x, float y, float w, float /*h*/, float alpha, const uchar * /*mono_rgba[4]*/)
|
||||
{
|
||||
|
|
@ -980,6 +996,7 @@ static void init_internal_icons()
|
|||
def_internal_vicon(ICON_LIBRARY_DATA_INDIRECT, vicon_strip_color_draw_library_data_indirect);
|
||||
def_internal_vicon(ICON_LIBRARY_DATA_OVERRIDE_NONEDITABLE,
|
||||
vicon_strip_color_draw_library_data_override_noneditable);
|
||||
def_internal_vicon(ICON_PACKAGE_INDIRECT, vicon_strip_color_draw_package_indirect);
|
||||
|
||||
def_internal_vicon(ICON_LAYERGROUP_COLOR_01, vicon_layergroup_color_draw_01);
|
||||
def_internal_vicon(ICON_LAYERGROUP_COLOR_02, vicon_layergroup_color_draw_02);
|
||||
|
|
@ -1968,6 +1985,9 @@ int icon_from_library(const ID *id)
|
|||
{
|
||||
if (ID_IS_LINKED(id)) {
|
||||
if (ID_IS_PACKED(id)) {
|
||||
if (id->tag & ID_TAG_INDIRECT) {
|
||||
return ICON_PACKAGE_INDIRECT;
|
||||
}
|
||||
return ICON_PACKAGE;
|
||||
}
|
||||
if (id->tag & ID_TAG_MISSING) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue