Graph Editor Selection Fix for Durian:
authorJoshua Leung <aligorith@gmail.com>
Sat, 22 May 2010 04:54:34 +0000 (04:54 +0000)
committerJoshua Leung <aligorith@gmail.com>
Sat, 22 May 2010 04:54:34 +0000 (04:54 +0000)
Animators were having trouble selecting keyframes and their handles when zoomed in extremely. This commit seems to fix these issues, which appear to have resulted from some overflowing ints, which gave out-of-view handles priority quite often.

source/blender/editors/space_graph/graph_select.c

index f347bfea290b87db85a58e3dd90caf4c0cb2eeb8..17b0a87b0a8bddc477a510d9550a5f52a6af2a12 100644 (file)
@@ -780,7 +780,7 @@ static void nearest_fcurve_vert_store (ListBase *matches, View2D *v2d, FCurve *f
                 *      needed to access the relevant vertex coordinates in the 3x3 
                 *      'vec' matrix
                 */
-               UI_view2d_to_region_no_clip(v2d, bezt->vec[hpoint+1][0], bezt->vec[hpoint+1][1], &screen_co[0], &screen_co[1]);
+               UI_view2d_view_to_region(v2d, bezt->vec[hpoint+1][0], bezt->vec[hpoint+1][1], &screen_co[0], &screen_co[1]);
                
                /* check if distance from mouse cursor to vert in screen space is within tolerance */
                        // XXX: inlined distance calculation, since we cannot do this on ints using the math lib...