diff options
author | Mike Erwin <significant.bit@gmail.com> | 2011-07-24 12:02:42 +0400 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2011-07-24 12:02:42 +0400 |
commit | 1ca4f1ba1c48b9afa46c85ce9010829a26194632 (patch) | |
tree | 6ebf7905d29f1644d68ea5cf5dfe2ba5207832cb | |
parent | c2c62134ccd97eef06822f4c414585bf5d455e16 (diff) |
sculpt/paint while using 3D mouse
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 12 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_stroke.c | 3 |
2 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index f4da734473d..28a54b20277 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1617,6 +1617,18 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event) tGPsdata *p= op->customdata; int estate = OPERATOR_PASS_THROUGH; /* default exit state - not handled, so let others have a share of the pie */ + // if (event->type == NDOF_MOTION) + // return OPERATOR_PASS_THROUGH; + // ------------------------------- + // [mce] Not quite what I was looking + // for, but a good start! GP continues to + // draw on the screen while the 3D mouse + // moves the viewpoint. Problem is that + // the stroke is converted to 3D only after + // it is finished. This approach should work + // better in tools that immediately apply + // in 3D space. + //printf("\tGP - handle modal event...\n"); /* exit painting mode (and/or end current stroke) */ diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 7ddf5dff000..bddb30a4262 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -832,6 +832,9 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event) float mouse[2]; int first= 0; + if (event->type == NDOF_MOTION) + return OPERATOR_PASS_THROUGH; + if(!stroke->stroke_started) { stroke->last_mouse_position[0] = event->x; stroke->last_mouse_position[1] = event->y; |