diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-08-30 09:54:27 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-08-30 09:54:27 +0400 |
commit | 05ebac71ca72966efd2d5d8692f5959c33a9d621 (patch) | |
tree | 56f3d92f49e56186651a59a6fbf686295f16c197 /source/blender/editors/gpencil | |
parent | e104b429295766f9276ea854e02f085cf65e623f (diff) |
Grease Pencil: Bugfix (Dots) + RNA Wrapping
* Making single dots should be possible again.
* Wrapped the debug option, 'Show Points', for layers, which makes all the points on the layer get drawn with dots indicating positions of stroke points.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_buttons.c | 14 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 6 |
2 files changed, 12 insertions, 8 deletions
diff --git a/source/blender/editors/gpencil/gpencil_buttons.c b/source/blender/editors/gpencil/gpencil_buttons.c index 954f6c7e61e..f29d37311fb 100644 --- a/source/blender/editors/gpencil/gpencil_buttons.c +++ b/source/blender/editors/gpencil/gpencil_buttons.c @@ -203,13 +203,6 @@ static void gp_drawui_layer (uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl) subcol= uiLayoutColumn(col, 1); uiItemR(subcol, NULL, 0, &ptr, "line_thickness", UI_ITEM_R_SLIDER); - /* debugging options */ - if (G.f & G_DEBUG) { - // XXX this option hasn't been wrapped yet... since it's just debug - //subcol= uiLayoutColumn(col, 1); - // uiItemR(subrow, NULL, 0, &ptr, "show_points", 0); - } - /* right column ................... */ col= uiLayoutColumn(split, 0); @@ -218,6 +211,13 @@ static void gp_drawui_layer (uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl) uiItemR(subcol, "Onion Skinning", 0, &ptr, "use_onion_skinning", 0); uiItemR(subcol, "GStep", 0, &ptr, "max_ghost_range", 0); // XXX shorter name here? (i.e. GStep) + /* debugging options */ + // XXX re-enable the debug-only checks later + //if (G.f & G_DEBUG) { + subcol= uiLayoutColumn(col, 1); + uiItemR(subcol, NULL, 0, &ptr, "show_points", 0); + //} + /* additional options... */ // None at the moment... } diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 9cf6f3d751f..c18a807f9d4 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -161,8 +161,12 @@ static short gp_stroke_filtermval (tGPsdata *p, int mval[2], int pmval[2]) int dx= abs(mval[0] - pmval[0]); int dy= abs(mval[1] - pmval[1]); + /* if buffer is empty, just let this go through (i.e. so that dots will work) */ + if (p->gpd->sbuffer_size == 0) + return 1; + /* check if mouse moved at least certain distance on both axes (best case) */ - if ((dx > MIN_MANHATTEN_PX) && (dy > MIN_MANHATTEN_PX)) + else if ((dx > MIN_MANHATTEN_PX) && (dy > MIN_MANHATTEN_PX)) return 1; /* check if the distance since the last point is significant enough */ |