Disable cursor drawing while navigating
authorCampbell Barton <ideasman42@gmail.com>
Thu, 5 Oct 2017 06:35:46 +0000 (17:35 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 5 Oct 2017 06:35:46 +0000 (17:35 +1100)
Was performing ray-casts in sculpt mode on every update.

source/blender/editors/sculpt_paint/paint_cursor.c

index 6145c549e9b9f63819ffd8e7221f6ada391d7647..5bc21457d54300dfb7c3260ef6292c6aa7478dd9 100644 (file)
@@ -42,6 +42,7 @@
 #include "DNA_scene_types.h"
 #include "DNA_screen_types.h"
 #include "DNA_userdef_types.h"
+#include "DNA_view3d_types.h"
 
 #include "BKE_brush.h"
 #include "BKE_context.h"
@@ -1002,8 +1003,9 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
         * mouse over too, not just during a stroke */
        view3d_set_viewcontext(C, &vc);
 
-       get_imapaint_zoom(C, &zoomx, &zoomy);
-       zoomx = max_ff(zoomx, zoomy);
+       if (vc.rv3d->rflag & RV3D_NAVIGATING) {
+               return;
+       }
 
        /* skip everything and draw brush here */
        if (brush->flag & BRUSH_CURVE) {
@@ -1011,6 +1013,9 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
                return;
        }
 
+       get_imapaint_zoom(C, &zoomx, &zoomy);
+       zoomx = max_ff(zoomx, zoomy);
+
        /* set various defaults */
        translation[0] = x;
        translation[1] = y;