[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52038] trunk/blender/source/blender/ editors/interface/interface_handlers.c: Usability:
Daniel Salazar - 3Developer.com
zanqdo at gmail.com
Fri Nov 9 20:11:12 CET 2012
Oh please make this also work for ramps, they can be pretty hard to
control precisely
cheers!
Daniel Salazar
patazstudio.com
On Fri, Nov 9, 2012 at 7:33 AM, Ton Roosendaal <ton at blender.org> wrote:
> Revision: 52038
>
> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52038
> Author: ton
> Date: 2012-11-09 13:33:23 +0000 (Fri, 09 Nov 2012)
> Log Message:
> -----------
> Usability:
>
> Made SHIFT+drag mouse in Curve and ColorPicker widgets move with more
> precision.
> This was only working with UserPref "continuous grab".
>
> Modified Paths:
> --------------
> trunk/blender/source/blender/editors/interface/interface_handlers.c
>
> Modified:
> trunk/blender/source/blender/editors/interface/interface_handlers.c
> ===================================================================
> --- trunk/blender/source/blender/editors/interface/interface_handlers.c
> 2012-11-09 11:03:53 UTC (rev 52037)
> +++ trunk/blender/source/blender/editors/interface/interface_handlers.c
> 2012-11-09 13:33:23 UTC (rev 52038)
> @@ -279,12 +279,7 @@
>
> static float ui_mouse_scale_warp_factor(const short shift)
> {
> - if (U.uiflag & USER_CONTINUOUS_MOUSE) {
> - return shift ? 0.05f : 1.0f;
> - }
> - else {
> - return 1.0f;
> - }
> + return shift ? 0.05f : 1.0f;
> }
>
> static void ui_mouse_scale_warp(uiHandleButtonData *data,
> @@ -292,16 +287,11 @@
> float *r_mx, float *r_my,
> const short shift)
> {
> - if (U.uiflag & USER_CONTINUOUS_MOUSE) {
> - const float fac = ui_mouse_scale_warp_factor(shift);
> - /* slow down the mouse, this is fairly picky */
> - *r_mx = (data->dragstartx * (1.0f - fac) + mx * fac);
> - *r_my = (data->dragstarty * (1.0f - fac) + my * fac);
> - }
> - else {
> - *r_mx = mx;
> - *r_my = my;
> - }
> + const float fac = ui_mouse_scale_warp_factor(shift);
> +
> + /* slow down the mouse, this is fairly picky */
> + *r_mx = (data->dragstartx * (1.0f - fac) + mx * fac);
> + *r_my = (data->dragstarty * (1.0f - fac) + my * fac);
> }
>
> /* file selectors are exempt from utf-8 checks */
>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at blender.org
> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>
More information about the Bf-committers
mailing list