diff options
author | Joshua Leung <aligorith@gmail.com> | 2015-04-19 16:02:49 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2015-04-20 08:27:55 +0300 |
commit | 5f6b958e969d3300502933ea6276abf46e75c675 (patch) | |
tree | a300b97b33911c7b0be568b7ba1a854573527bb1 /source/blender | |
parent | 79319b3fba306524eef71946098deda71a449134 (diff) |
Fix: "show_points" setting for Grease Pencil drawing didn't work
As reported by zeffi, the "show_points" option was not working in master.
It probably broke recently, after some changes meant that the point sizes
weren't geting set prior to drawing these points anymore. Since this was
originally added as a debugging tool (though it is now somewhat redundant
due to the stroke editing functionality, which uses/exposes the same points),
this option wasn't really that important. I have decided to add back a toggle
for this to the UI though, since it can be used for some interesting effects...
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil.c | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 08926926861..0d35d3ce716 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -443,6 +443,8 @@ static void gp_draw_stroke_3d(bGPDspoint *points, int totpoints, short thickness /* draw debug points of curve on top? */ /* XXX: for now, we represent "selected" strokes in the same way as debug, which isn't used anymore */ if (debug) { + glPointSize((float)(thickness + 2)); + glBegin(GL_POINTS); for (i = 0, pt = points; i < totpoints && pt; i++, pt++) glVertex3fv(&pt->x); @@ -617,6 +619,8 @@ static void gp_draw_stroke_2d(bGPDspoint *points, int totpoints, short thickness bGPDspoint *pt; int i; + glPointSize((float)(thickness_s + 2)); + glBegin(GL_POINTS); for (i = 0, pt = points; i < totpoints && pt; i++, pt++) { float co[2]; @@ -876,7 +880,7 @@ static void gp_draw_strokes_edit(bGPDframe *gpf, int offsx, int offsy, int winx, /* draw onion-skinning for a layer */ static void gp_draw_onionskins(bGPDlayer *gpl, bGPDframe *gpf, int offsx, int offsy, int winx, int winy, - int UNUSED(cfra), int dflag, short debug, short lthick) + int UNUSED(cfra), int dflag, bool debug, short lthick) { const float alpha = gpl->color[3]; float color[4]; diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index 2f4e7881843..7d7df0f91a7 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -775,8 +775,8 @@ static void rna_def_gpencil_layer(BlenderRNA *brna) prop = RNA_def_property(srna, "show_points", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_DRAWDEBUG); RNA_def_property_ui_text(prop, "Show Points", "Draw the points which make up the strokes (for debugging purposes)"); - RNA_def_property_update_runtime(prop, "rna_GPencil_update"); - + RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update"); + /* X-Ray */ prop = RNA_def_property(srna, "show_x_ray", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GP_LAYER_NO_XRAY); |