From e850a097625d2e527fa4caf1dbf21a9cf44cc543 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Wed, 19 Feb 2025 01:11:24 +0100 Subject: [PATCH] UI: Add Icons to Represent Error Conditions This PR adds three SVG Icons. One to represent that an icon is not found - ICON_NOT_FOUND - so represent when an out-of-range value was used to specify an icon. The second - ICON_CHAR_NOTDEF - is to represent that a text character is not found in the specified font or font stack. The third - ICON_CHAR_REPLACEMENT - is to indicate the portion of a text string that contains invalid bytes. Pull Request: https://projects.blender.org/blender/blender/pulls/134008 --- release/datafiles/icons_svg/char_notdef.svg | 1 + release/datafiles/icons_svg/char_replacement.svg | 1 + release/datafiles/icons_svg/not_found.svg | 1 + source/blender/editors/datafiles/CMakeLists.txt | 3 +++ source/blender/editors/include/UI_icons.hh | 5 +++++ 5 files changed, 11 insertions(+) create mode 100644 release/datafiles/icons_svg/char_notdef.svg create mode 100644 release/datafiles/icons_svg/char_replacement.svg create mode 100644 release/datafiles/icons_svg/not_found.svg diff --git a/release/datafiles/icons_svg/char_notdef.svg b/release/datafiles/icons_svg/char_notdef.svg new file mode 100644 index 00000000000..341d7dd44bc --- /dev/null +++ b/release/datafiles/icons_svg/char_notdef.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/release/datafiles/icons_svg/char_replacement.svg b/release/datafiles/icons_svg/char_replacement.svg new file mode 100644 index 00000000000..f051ba2357b --- /dev/null +++ b/release/datafiles/icons_svg/char_replacement.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/release/datafiles/icons_svg/not_found.svg b/release/datafiles/icons_svg/not_found.svg new file mode 100644 index 00000000000..1b8290c586b --- /dev/null +++ b/release/datafiles/icons_svg/not_found.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt index 1ed25dcd347..1095c6d0c2b 100644 --- a/source/blender/editors/datafiles/CMakeLists.txt +++ b/source/blender/editors/datafiles/CMakeLists.txt @@ -234,6 +234,8 @@ if(WITH_BLENDER) cancel cancel_large center_only + char_notdef + char_replacement checkbox_dehlt checkbox_hlt checkmark @@ -640,6 +642,7 @@ if(WITH_BLENDER) normals_face normals_vertex normals_vertex_face + not_found object_data object_datamode object_hidden diff --git a/source/blender/editors/include/UI_icons.hh b/source/blender/editors/include/UI_icons.hh index adce49950d1..36d3ba6eb7f 100644 --- a/source/blender/editors/include/UI_icons.hh +++ b/source/blender/editors/include/UI_icons.hh @@ -40,6 +40,11 @@ /* ICON_NONE has to be the first item here because it is hard-coded in places as 0. */ DEF_ICON(NONE) +/* Keep these here, in this order. Their IDs should be static. */ +DEF_ICON(CHAR_NOTDEF) +DEF_ICON(CHAR_REPLACEMENT) +DEF_ICON(NOT_FOUND) + /* Blank is no real icon, but used as placeholder or spacers, * it takes the space of an icon but is empty. */ DEF_ICON(BLANK1)