Commit: 8db514f81dc1309d30e6741f85d99a9ca4ffccff
Author: Bruno Boaventura Scholl
Date:   Thu Jun 6 18:00:56 2019 +0200
Branches: master
https://developer.blender.org/rB8db514f81dc1309d30e6741f85d99a9ca4ffccff

Fix T60441, T60619: incorrect values for color values > 1.0

Modulo makes no sense here at all, is from an old bugfix to prevent a crash
that is no longer an issue.

Differential Revision: https://developer.blender.org/D4727

===================================================================

M       source/blender/editors/interface/interface_region_color_picker.c

===================================================================

diff --git a/source/blender/editors/interface/interface_region_color_picker.c 
b/source/blender/editors/interface/interface_region_color_picker.c
index 723222d56d1..5c231f5e51a 100644
--- a/source/blender/editors/interface/interface_region_color_picker.c
+++ b/source/blender/editors/interface/interface_region_color_picker.c
@@ -194,7 +194,6 @@ static void ui_update_color_picker_buts_rgb(uiBut *from_but,
     else if (STREQ(bt->str, "Hex: ")) {
       float rgb_hex[3];
       uchar rgb_hex_uchar[3];
-      double intpart;
       char col[16];
 
       /* Hex code is assumed to be in sRGB space
@@ -204,16 +203,6 @@ static void ui_update_color_picker_buts_rgb(uiBut 
*from_but,
         IMB_colormanagement_scene_linear_to_srgb_v3(rgb_hex);
       }
 
-      if (rgb_hex[0] > 1.0f) {
-        rgb_hex[0] = modf(rgb_hex[0], &intpart);
-      }
-      if (rgb_hex[1] > 1.0f) {
-        rgb_hex[1] = modf(rgb_hex[1], &intpart);
-      }
-      if (rgb_hex[2] > 1.0f) {
-        rgb_hex[2] = modf(rgb_hex[2], &intpart);
-      }
-
       rgb_float_to_uchar(rgb_hex_uchar, rgb_hex);
       BLI_snprintf(col, sizeof(col), "%02X%02X%02X", UNPACK3_EX((uint), 
rgb_hex_uchar, ));

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to