[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28944] trunk/blender/source/blender/ editors/interface/interface_regions.c: Fix [#22278] Colour Balance Node HSV Value slider range is insufficient.

Matt Ebb matt at mke3.net
Mon May 24 04:05:26 CEST 2010


Revision: 28944
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28944
Author:   broken
Date:     2010-05-24 04:05:23 +0200 (Mon, 24 May 2010)

Log Message:
-----------
Fix [#22278] Colour Balance Node HSV Value slider range is insufficient.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/interface/interface_regions.c

Modified: trunk/blender/source/blender/editors/interface/interface_regions.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_regions.c	2010-05-24 01:23:46 UTC (rev 28943)
+++ trunk/blender/source/blender/editors/interface/interface_regions.c	2010-05-24 02:05:23 UTC (rev 28944)
@@ -1770,6 +1770,7 @@
 	static float hsv[3];
 	static char hexcol[128];
 	float rgb_gamma[3];
+	float min, max, step, precision;
 	const char *propname = RNA_property_identifier(prop);
 	
 	width= PICKER_TOTAL_W;
@@ -1785,6 +1786,7 @@
 		linearrgb_to_srgb_v3_v3(rgb_gamma, rgb);
 	}
 	
+	RNA_property_float_ui_range(ptr, prop, &min, &max, &step, &precision);
 	RNA_property_float_get_array(ptr, prop, rgb);
 	rgb_to_hsv(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2);
 
@@ -1833,7 +1835,7 @@
 	uiButSetFunc(bt, do_hsv_rna_cb, bt, hsv);
 	bt= uiDefButF(block, NUMSLI, 0, "S ",	0, -80, butwidth, UI_UNIT_Y, hsv+1, 0.0, 1.0, 10, 3, "");
 	uiButSetFunc(bt, do_hsv_rna_cb, bt, hsv);
-	bt= uiDefButF(block, NUMSLI, 0, "V ",	0, -100, butwidth, UI_UNIT_Y, hsv+2, 0.0, 1.0, 10, 3, "");
+	bt= uiDefButF(block, NUMSLI, 0, "V ",	0, -100, butwidth, UI_UNIT_Y, hsv+2, 0.0, max, 10, 3, "");
 	uiButSetFunc(bt, do_hsv_rna_cb, bt, hsv);
 	uiBlockEndAlign(block);
 	





More information about the Bf-blender-cvs mailing list