Disable cursor drawing while navigating

Was performing ray-casts in sculpt mode on every update.
This commit is contained in:
Campbell Barton
2017-10-05 17:35:46 +11:00
parent 775c773cf4
commit 82d6a30015

View 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;