diff options
author | Joshua Leung <aligorith@gmail.com> | 2014-12-27 07:37:45 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2014-12-27 17:05:10 +0300 |
commit | 4ab58837667c990baeddea2e9d722c3203743c9c (patch) | |
tree | bd66ebdd759d878011445d12e8ab6ce9606b6f8f /source/blender/editors/gpencil | |
parent | 49052c61f8326c11bc733a040372481ea1d7438b (diff) |
Experimental fix for "random large dots" bug when using a stylus
Since I don't have a (pressure sensitive) tablet handy, I can't really test this
out, but apparently there is a bug which currently exists with the following description:
"Small Dots, when you do just one click a single GP dot is created, it´s fine but don't recognize the pen pressure, always the maximum value of thickness, and
It´s so easy create dots accidentally (even when you use the eraser, this dots appear spontaneously) and you start to have big screen-size-constant dots beside of you fine lines."
This commit just shuffles around the order of things a bit so that some of the misfiring
events might get skipped instead.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index d4026b14fd7..e6f6644fd24 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1598,15 +1598,6 @@ static void gpencil_draw_apply_event(wmOperator *op, const wmEvent *event) else p->pressure = 1.0f; - /* fill in stroke data (not actually used directly by gpencil_draw_apply) */ - RNA_collection_add(op->ptr, "stroke", &itemptr); - - mousef[0] = p->mval[0]; - mousef[1] = p->mval[1]; - RNA_float_set_array(&itemptr, "mouse", mousef); - RNA_float_set(&itemptr, "pressure", p->pressure); - RNA_boolean_set(&itemptr, "is_start", (p->flags & GP_PAINTFLAG_FIRSTRUN)); - /* special exception for start of strokes (i.e. maybe for just a dot) */ if (p->flags & GP_PAINTFLAG_FIRSTRUN) { p->flags &= ~GP_PAINTFLAG_FIRSTRUN; @@ -1623,6 +1614,15 @@ static void gpencil_draw_apply_event(wmOperator *op, const wmEvent *event) return; } + /* fill in stroke data (not actually used directly by gpencil_draw_apply) */ + RNA_collection_add(op->ptr, "stroke", &itemptr); + + mousef[0] = p->mval[0]; + mousef[1] = p->mval[1]; + RNA_float_set_array(&itemptr, "mouse", mousef); + RNA_float_set(&itemptr, "pressure", p->pressure); + RNA_boolean_set(&itemptr, "is_start", (p->flags & GP_PAINTFLAG_FIRSTRUN)); + RNA_float_set(&itemptr, "time", p->curtime - p->inittime); /* apply the current latest drawing point */ |