[Bf-blender-cvs] [ab3d9b6e8c4] greasepencil-object: Enable Fill for DOTs mode
Antonio Vazquez
noreply at git.blender.org
Sun Feb 25 11:17:22 CET 2018
Commit: ab3d9b6e8c4f9bfa7f4db143bdf17db8d18aaf98
Author: Antonio Vazquez
Date: Sun Feb 25 11:16:45 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rBab3d9b6e8c4f9bfa7f4db143bdf17db8d18aaf98
Enable Fill for DOTs mode
The fill was disabled for dots mode and only used in line mode. Now, as Dots can be used to draw, the fill is required.
===================================================================
M source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
===================================================================
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
index 2c41f947112..7f26d671745 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -780,7 +780,7 @@ static void gpencil_draw_strokes(GpencilBatchCache *cache, GPENCIL_e_data *e_dat
#endif
if ((gpl->actframe->framenum == derived_gpf->framenum) || (!is_multiedit) || ((gpd->flag & GP_DATA_STROKE_MULTIEDIT_LINES) == 0)) {
int id = stl->storage->shgroup_id;
- if ((gps->totpoints > 1) && (gps->palcolor->mode == PAC_MODE_LINE)) {
+ if (gps->totpoints > 0) {
if ((gps->totpoints > 2) && (!GP_SIMPLIFY_FILL(ts, playing)) &&
((gps->palcolor->fill[3] > GPENCIL_ALPHA_OPACITY_THRESH) || (gps->palcolor->fill_style > 0)) &&
((gps->flag & GP_STROKE_NOFILL) == 0))
@@ -790,17 +790,17 @@ static void gpencil_draw_strokes(GpencilBatchCache *cache, GPENCIL_e_data *e_dat
else {
stl->shgroups[id].shgrps_fill = NULL;
}
- stl->shgroups[id].shgrps_stroke = DRW_gpencil_shgroup_stroke_create(e_data, vedata, psl->stroke_pass, e_data->gpencil_stroke_sh, ob, gpd, gps->palcolor, id);
- }
- else {
- stl->shgroups[id].shgrps_fill = NULL;
- if (gps->totpoints > 0) {
- stl->shgroups[id].shgrps_stroke = DRW_gpencil_shgroup_point_create(e_data, vedata, psl->stroke_pass, e_data->gpencil_point_sh, ob, gpd, gps->palcolor, id);
+ if (gps->palcolor->mode == PAC_MODE_LINE) {
+ stl->shgroups[id].shgrps_stroke = DRW_gpencil_shgroup_stroke_create(e_data, vedata, psl->stroke_pass, e_data->gpencil_stroke_sh, ob, gpd, gps->palcolor, id);
}
else {
- stl->shgroups[id].shgrps_stroke = NULL;
+ stl->shgroups[id].shgrps_stroke = DRW_gpencil_shgroup_point_create(e_data, vedata, psl->stroke_pass, e_data->gpencil_point_sh, ob, gpd, gps->palcolor, id);
}
}
+ else {
+ stl->shgroups[id].shgrps_fill = NULL;
+ stl->shgroups[id].shgrps_stroke = NULL;
+ }
stl->storage->shgroup_id++;
fillgrp = stl->shgroups[id].shgrps_fill;
More information about the Bf-blender-cvs
mailing list