[Bf-blender-cvs] [7795559] compositor-2016: Fix T48534: color picker hex #RRGGBB input allows typing one character too many.

Brecht Van Lommel noreply at git.blender.org
Wed Jun 8 21:50:43 CEST 2016


Commit: 779555913e193b756ad027aa9f0ed60db0b8b712
Author: Brecht Van Lommel
Date:   Sat May 28 12:36:52 2016 +0200
Branches: compositor-2016
https://developer.blender.org/rB779555913e193b756ad027aa9f0ed60db0b8b712

Fix T48534: color picker hex #RRGGBB input allows typing one character too many.

Fix suggested by Daniel Rivera.

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

M	source/blender/editors/interface/interface_regions.c
M	source/blender/makesrna/intern/rna_camera.c

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

diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 9e49d7e..2bbd5b8 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -2418,7 +2418,7 @@ static void ui_block_colorpicker(uiBlock *block, float rgba[4], PointerRNA *ptr,
 	BLI_snprintf(hexcol, sizeof(hexcol), "%02X%02X%02X", UNPACK3_EX((unsigned int), rgb_gamma_uchar, ));
 
 	yco = -3.0f * UI_UNIT_Y;
-	bt = uiDefBut(block, UI_BTYPE_TEXT, 0, IFACE_("Hex: "), 0, yco, butwidth, UI_UNIT_Y, hexcol, 0, 8, 0, 0, TIP_("Hex triplet for color (#RRGGBB)"));
+	bt = uiDefBut(block, UI_BTYPE_TEXT, 0, IFACE_("Hex: "), 0, yco, butwidth, UI_UNIT_Y, hexcol, 0, 7, 0, 0, TIP_("Hex triplet for color (#RRGGBB)"));
 	UI_but_func_set(bt, ui_colorpicker_hex_rna_cb, bt, hexcol);
 	bt->custom_data = cpicker;
 	uiDefBut(block, UI_BTYPE_LABEL, 0, IFACE_("(Gamma Corrected)"), 0, yco - UI_UNIT_Y, butwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index 2273cba..678b0ac 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -132,7 +132,7 @@ static void rna_def_camera_stereo_data(BlenderRNA *brna)
 
 	prop = RNA_def_property(srna, "interocular_distance", PROP_FLOAT, PROP_DISTANCE);
 	RNA_def_property_range(prop, 0.0f, FLT_MAX);
-	RNA_def_property_ui_range(prop, 0.0f, 100.0f, 10, 3);
+	RNA_def_property_ui_range(prop, 0.0f, 1e4f, 1, 3);
 	RNA_def_property_ui_text(prop, "Interocular Distance",
 	                         "Set the distance between the eyes - the stereo plane distance / 30 should be fine");
 	RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);




More information about the Bf-blender-cvs mailing list