From 2be412c769b82e7a09b5cf7108c2f26d5553f458 Mon Sep 17 00:00:00 2001 From: Bartosz Kosiorek Date: Fri, 22 Mar 2024 23:18:04 +0100 Subject: [PATCH] UI: Improve Tooltips for colorspace description Currently in Blender, the colorspace tips are not much useful, as it is not describe the differences between different colorspaces. It is especially important for translated interface, and beginners. This patch fixes that, and allows to easily distinguish different colorspaces. --- .../blender/makesrna/intern/rna_nodetree.cc | 80 +++++++++++++++---- 1 file changed, 64 insertions(+), 16 deletions(-) diff --git a/source/blender/makesrna/intern/rna_nodetree.cc b/source/blender/makesrna/intern/rna_nodetree.cc index 5c9a06bd9d3..d5746c3344f 100644 --- a/source/blender/makesrna/intern/rna_nodetree.cc +++ b/source/blender/makesrna/intern/rna_nodetree.cc @@ -486,9 +486,21 @@ const EnumPropertyItem rna_enum_node_geometry_curve_handle_side_items[] = { {0, nullptr, 0, nullptr, nullptr}}; const EnumPropertyItem rna_enum_node_combsep_color_items[] = { - {NODE_COMBSEP_COLOR_RGB, "RGB", ICON_NONE, "RGB", "Use RGB color processing"}, - {NODE_COMBSEP_COLOR_HSV, "HSV", ICON_NONE, "HSV", "Use HSV color processing"}, - {NODE_COMBSEP_COLOR_HSL, "HSL", ICON_NONE, "HSL", "Use HSL color processing"}, + {NODE_COMBSEP_COLOR_RGB, + "RGB", + ICON_NONE, + "RGB", + "Use RGB (Red, Green, Blue) color processing"}, + {NODE_COMBSEP_COLOR_HSV, + "HSV", + ICON_NONE, + "HSV", + "Use HSV (Hue, Saturation, Value) color processing"}, + {NODE_COMBSEP_COLOR_HSL, + "HSL", + ICON_NONE, + "HSL", + "Use HSL (Hue, Saturation, Lightness) color processing"}, {0, nullptr, 0, nullptr, nullptr}, }; @@ -5868,9 +5880,21 @@ static void def_sh_output_aov(StructRNA *srna) static void def_sh_combsep_color(StructRNA *srna) { static const EnumPropertyItem type_items[] = { - {NODE_COMBSEP_COLOR_RGB, "RGB", ICON_NONE, "RGB", "Use RGB color processing"}, - {NODE_COMBSEP_COLOR_HSV, "HSV", ICON_NONE, "HSV", "Use HSV color processing"}, - {NODE_COMBSEP_COLOR_HSL, "HSL", ICON_NONE, "HSL", "Use HSL color processing"}, + {NODE_COMBSEP_COLOR_RGB, + "RGB", + ICON_NONE, + "RGB", + "Use RGB (Red, Green, Blue) color processing"}, + {NODE_COMBSEP_COLOR_HSV, + "HSV", + ICON_NONE, + "HSV", + "Use HSV (Hue, Saturation, Value) color processing"}, + {NODE_COMBSEP_COLOR_HSL, + "HSL", + ICON_NONE, + "HSL", + "Use HSL (Hue, Saturation, Lightness) color processing"}, {0, nullptr, 0, nullptr, nullptr}, }; @@ -6904,12 +6928,15 @@ static void def_cmp_chroma_matte(StructRNA *srna) static void def_cmp_channel_matte(StructRNA *srna) { PropertyRNA *prop; - static const EnumPropertyItem color_space_items[] = { - {CMP_NODE_CHANNEL_MATTE_CS_RGB, "RGB", 0, "RGB", "RGB color space"}, - {CMP_NODE_CHANNEL_MATTE_CS_HSV, "HSV", 0, "HSV", "HSV color space"}, - {CMP_NODE_CHANNEL_MATTE_CS_YUV, "YUV", 0, "YUV", "YUV color space"}, - {CMP_NODE_CHANNEL_MATTE_CS_YCC, "YCC", 0, "YCbCr", "YCbCr color space"}, + {CMP_NODE_CHANNEL_MATTE_CS_RGB, "RGB", 0, "RGB", "RGB (Red, Green, Blue) color space"}, + {CMP_NODE_CHANNEL_MATTE_CS_HSV, "HSV", 0, "HSV", "HSV (Hue, Saturation, Value) color space"}, + {CMP_NODE_CHANNEL_MATTE_CS_YUV, "YUV", 0, "YUV", "YUV (Y - luma, U V - chroma) color space"}, + {CMP_NODE_CHANNEL_MATTE_CS_YCC, + "YCC", + 0, + "YCbCr", + "YCbCr (Y - luma, Cb - blue-difference chroma, Cr - red-difference chroma) color space"}, {0, nullptr, 0, nullptr, nullptr}, }; @@ -7658,11 +7685,32 @@ static void def_cmp_ycc(StructRNA *srna) static void def_cmp_combsep_color(StructRNA *srna) { static const EnumPropertyItem mode_items[] = { - {CMP_NODE_COMBSEP_COLOR_RGB, "RGB", ICON_NONE, "RGB", "Use RGB color processing"}, - {CMP_NODE_COMBSEP_COLOR_HSV, "HSV", ICON_NONE, "HSV", "Use HSV color processing"}, - {CMP_NODE_COMBSEP_COLOR_HSL, "HSL", ICON_NONE, "HSL", "Use HSL color processing"}, - {CMP_NODE_COMBSEP_COLOR_YCC, "YCC", ICON_NONE, "YCbCr", "Use YCbCr color processing"}, - {CMP_NODE_COMBSEP_COLOR_YUV, "YUV", ICON_NONE, "YUV", "Use YUV color processing"}, + {CMP_NODE_COMBSEP_COLOR_RGB, + "RGB", + ICON_NONE, + "RGB", + "Use RGB (Red, Green, Blue) color processing"}, + {CMP_NODE_COMBSEP_COLOR_HSV, + "HSV", + ICON_NONE, + "HSV", + "Use HSV (Hue, Saturation, Value) color processing"}, + {CMP_NODE_COMBSEP_COLOR_HSL, + "HSL", + ICON_NONE, + "HSL", + "Use HSL (Hue, Saturation, Lightness) color processing"}, + {CMP_NODE_COMBSEP_COLOR_YCC, + "YCC", + ICON_NONE, + "YCbCr", + "Use YCbCr (Y - luma, Cb - blue-difference chroma, Cr - red-difference chroma) color " + "processing"}, + {CMP_NODE_COMBSEP_COLOR_YUV, + "YUV", + ICON_NONE, + "YUV", + "Use YUV (Y - luma, U V - chroma) color processing"}, {0, nullptr, 0, nullptr, nullptr}, }; -- 2.30.2