Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-03-26 11:41:59 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-26 11:41:59 +0400
commit5a978a9d2186e863154b4053ab24e89264c39031 (patch)
tree7a7df3b0606ee4624e27854b2b82c47506efe504 /source/blender/editors/gpencil
parent64d161de87c82094ce8ea63bc69aded59f7f588d (diff)
grease pencil xray option wasn't being applied to single points in the 3d view.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 59850aff72f..fae3416e00a 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -499,9 +499,7 @@ static void gp_draw_strokes(bGPDframe *gpf, int offsx, int offsy, int winx, int
continue;
/* check which stroke-drawer to use */
- if (gps->totpoints == 1)
- gp_draw_stroke_point(gps->points, lthick, dflag, gps->flag, offsx, offsy, winx, winy);
- else if (dflag & GP_DRAWDATA_ONLY3D) {
+ if (dflag & GP_DRAWDATA_ONLY3D) {
const int no_xray = (dflag & GP_DRAWDATA_NO_XRAY);
int mask_orig = 0;
@@ -519,7 +517,12 @@ static void gp_draw_strokes(bGPDframe *gpf, int offsx, int offsy, int winx, int
#endif
}
- gp_draw_stroke_3d(gps->points, gps->totpoints, lthick, debug);
+ if (gps->totpoints == 1) {
+ gp_draw_stroke_point(gps->points, lthick, dflag, gps->flag, offsx, offsy, winx, winy);
+ }
+ else {
+ gp_draw_stroke_3d(gps->points, gps->totpoints, lthick, debug);
+ }
if (no_xray) {
glDepthMask(mask_orig);
@@ -532,8 +535,14 @@ static void gp_draw_strokes(bGPDframe *gpf, int offsx, int offsy, int winx, int
#endif
}
}
- else if (gps->totpoints > 1)
- gp_draw_stroke(gps->points, gps->totpoints, lthick, dflag, gps->flag, debug, offsx, offsy, winx, winy);
+ else {
+ if (gps->totpoints == 1) {
+ gp_draw_stroke_point(gps->points, lthick, dflag, gps->flag, offsx, offsy, winx, winy);
+ }
+ else {
+ gp_draw_stroke(gps->points, gps->totpoints, lthick, dflag, gps->flag, debug, offsx, offsy, winx, winy);
+ }
+ }
}
}