From d6ec2f0539f1c807558687d7f01968efc2baf71a Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Fri, 27 Sep 2024 17:24:40 +0200 Subject: [PATCH] UI: Update icon for Grease Pencil layer and group The current icon for Grease Pencil layers is a pen, it doesn't really communicate the "layer" aspect. Replace with a paper sheet-like icon. The layer group gets its own icon. It's a stack of animation paper. Inspired by Daniel Correa Flores's design on DevTalk: https://devtalk.blender.org/t/ui-discussion-grease-pencil-layer-and-layer-group-icons/30693/25 Pull Request: https://projects.blender.org/blender/blender/pulls/128208 --- .../icons_svg/greasepencil_layer_group.svg | 64 +++++++++++++++++++ .../icons_svg/outliner_data_gp_layer.svg | 7 +- .../animation/anim_channels_defines.cc | 2 +- .../blender/editors/datafiles/CMakeLists.txt | 1 + source/blender/editors/include/UI_icons.hh | 1 + .../editors/interface/interface_icons.cc | 2 +- ...rface_template_grease_pencil_layer_tree.cc | 2 +- .../editors/space_outliner/outliner_draw.cc | 2 +- 8 files changed, 76 insertions(+), 5 deletions(-) create mode 100644 release/datafiles/icons_svg/greasepencil_layer_group.svg diff --git a/release/datafiles/icons_svg/greasepencil_layer_group.svg b/release/datafiles/icons_svg/greasepencil_layer_group.svg new file mode 100644 index 00000000000..55fc08437e5 --- /dev/null +++ b/release/datafiles/icons_svg/greasepencil_layer_group.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + diff --git a/release/datafiles/icons_svg/outliner_data_gp_layer.svg b/release/datafiles/icons_svg/outliner_data_gp_layer.svg index 61fe857f872..66c93880bb8 100644 --- a/release/datafiles/icons_svg/outliner_data_gp_layer.svg +++ b/release/datafiles/icons_svg/outliner_data_gp_layer.svg @@ -1 +1,6 @@ - \ No newline at end of file + + + + + + diff --git a/source/blender/editors/animation/anim_channels_defines.cc b/source/blender/editors/animation/anim_channels_defines.cc index 6ff8cf46f76..3ec4e4c8f4b 100644 --- a/source/blender/editors/animation/anim_channels_defines.cc +++ b/source/blender/editors/animation/anim_channels_defines.cc @@ -3893,7 +3893,7 @@ static void *layer_setting_ptr(bAnimListElem *ale, static int layer_group_icon(bAnimListElem * /*ale*/) { - return ICON_FILE_FOLDER; + return ICON_GREASEPENCIL_LAYER_GROUP; } static void layer_group_color(bAnimContext * /*ac*/, bAnimListElem * /*ale*/, float r_color[3]) diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt index d57ac3deba0..1cf6a497bf2 100644 --- a/source/blender/editors/datafiles/CMakeLists.txt +++ b/source/blender/editors/datafiles/CMakeLists.txt @@ -373,6 +373,7 @@ if(WITH_BLENDER) gp_select_strokes graph greasepencil + greasepencil_layer_group grid grip group diff --git a/source/blender/editors/include/UI_icons.hh b/source/blender/editors/include/UI_icons.hh index 2cde23d93df..9b1fb0236a7 100644 --- a/source/blender/editors/include/UI_icons.hh +++ b/source/blender/editors/include/UI_icons.hh @@ -261,6 +261,7 @@ DEF_ICON(FACE_MAPS) DEF_ICON(FCURVE) DEF_ICON(FILE) DEF_ICON(GREASEPENCIL) +DEF_ICON(GREASEPENCIL_LAYER_GROUP) DEF_ICON(GROUP_BONE) DEF_ICON(GROUP_UVS) DEF_ICON(GROUP_VCOL) diff --git a/source/blender/editors/interface/interface_icons.cc b/source/blender/editors/interface/interface_icons.cc index 51142620c7f..cce882183d6 100644 --- a/source/blender/editors/interface/interface_icons.cc +++ b/source/blender/editors/interface/interface_icons.cc @@ -492,7 +492,7 @@ static void vicon_layergroup_color_draw( UI_icon_draw_ex(x, y, - ICON_FILE_FOLDER, + ICON_GREASEPENCIL_LAYER_GROUP, aspect, 1.0f, 0.0f, diff --git a/source/blender/editors/interface/templates/interface_template_grease_pencil_layer_tree.cc b/source/blender/editors/interface/templates/interface_template_grease_pencil_layer_tree.cc index b3bca58d654..1974200fe28 100644 --- a/source/blender/editors/interface/templates/interface_template_grease_pencil_layer_tree.cc +++ b/source/blender/editors/interface/templates/interface_template_grease_pencil_layer_tree.cc @@ -384,7 +384,7 @@ class LayerGroupViewItem : public AbstractTreeViewItem { { uiItemS_ex(&row, 0.8f); - short icon = ICON_FILE_FOLDER; + short icon = ICON_GREASEPENCIL_LAYER_GROUP; if (group_.color_tag != LAYERGROUP_COLOR_NONE) { icon = ICON_LAYERGROUP_COLOR_01 + group_.color_tag; } diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc index a1a0635780d..efcdfefbb37 100644 --- a/source/blender/editors/space_outliner/outliner_draw.cc +++ b/source/blender/editors/space_outliner/outliner_draw.cc @@ -2947,7 +2947,7 @@ TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te) data.icon = ICON_OUTLINER_DATA_GP_LAYER; } else if (node.is_group()) { - data.icon = ICON_FILE_FOLDER; + data.icon = ICON_GREASEPENCIL_LAYER_GROUP; } break; }