Commit: 86fe894f8624fe64c5acde94de0e5d14e8803a55
Author: Julian Eisel
Date:   Mon Apr 13 20:27:32 2015 +0200
Branches: master
https://developer.blender.org/rB86fe894f8624fe64c5acde94de0e5d14e8803a55

Moar precision for Color Stop position slider in Color Ramps

Normal dragging now uses a precision of 0.01 instead of 0.1, shift+dragging now 
uses 0.001. (0.1 steps can still be done using ctrl)

Requested by @venomgfx

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

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

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

diff --git a/source/blender/editors/interface/interface_templates.c 
b/source/blender/editors/interface/interface_templates.c
index c36d25b..c3a9d17 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -1561,6 +1561,7 @@ static void colorband_buttons_layout(uiLayout *layout, 
uiBlock *block, ColorBand
                        row = uiLayoutRow(split, false);
                        uiItemR(row, &ptr, "position", 0, IFACE_("Pos"), 
ICON_NONE);
                        bt = block->buttons.last;
+                       bt->a1 = 1.0f; /* gives a bit more precision for 
modifying position */
                        UI_but_func_set(bt, colorband_update_cb, bt, coba);
 
                        row = uiLayoutRow(layout, false);
@@ -1578,6 +1579,7 @@ static void colorband_buttons_layout(uiLayout *layout, 
uiBlock *block, ColorBand
                        row = uiLayoutRow(subsplit, false);
                        uiItemR(row, &ptr, "position", UI_ITEM_R_SLIDER, 
IFACE_("Pos"), ICON_NONE);
                        bt = block->buttons.last;
+                       bt->a1 = 1.0f; /* gives a bit more precision for 
modifying position */
                        UI_but_func_set(bt, colorband_update_cb, bt, coba);
 
                        row = uiLayoutRow(split, false);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to