[Bf-blender-cvs] [c5971d1f804] greasepencil-object: Cleanup: Define alpha field.
Antonio Vazquez
noreply at git.blender.org
Tue May 15 10:17:25 CEST 2018
Commit: c5971d1f804858a3435be854bea639934f0dd8f2
Author: Antonio Vazquez
Date: Tue May 15 09:57:52 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rBc5971d1f804858a3435be854bea639934f0dd8f2
Cleanup: Define alpha field.
===================================================================
M source/blender/draw/engines/gpencil/gpencil_draw_utils.c
===================================================================
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 353f64a4d18..ea6200f79b7 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -588,6 +588,8 @@ static void gpencil_add_editpoints_shgroup(
bGPdata *gpd, bGPDlayer *gpl, bGPDframe *gpf, bGPDstroke *gps)
{
MaterialGPencilStyle *gp_style = BKE_material_gpencil_settings_get(ob, gps->mat_nr + 1);
+ /* alpha factor for edit points/line to make them more subtle */
+ float edit_alpha = ts->gp_sculpt.alpha;
if (GPENCIL_ANY_EDIT_MODE(gpd)) {
const DRWContextState *draw_ctx = DRW_context_state_get();
@@ -600,7 +602,7 @@ static void gpencil_add_editpoints_shgroup(
/* line of the original stroke */
if (cache->is_dirty) {
gpencil_batch_cache_check_free_slots(ob);
- cache->batch_edlin[cache->cache_idx] = DRW_gpencil_get_edlin_geom(gps, ts->gp_sculpt.alpha, gpd->flag);
+ cache->batch_edlin[cache->cache_idx] = DRW_gpencil_get_edlin_geom(gps, edit_alpha, gpd->flag);
}
if (cache->batch_edlin[cache->cache_idx]) {
if ((obact) && (obact == ob) && (gpd->flag & GP_DATA_STROKE_SHOW_EDIT_LINES)) {
@@ -612,7 +614,7 @@ static void gpencil_add_editpoints_shgroup(
if ((gpl->flag & GP_LAYER_UNLOCK_COLOR) || ((gp_style->flag & GP_STYLE_COLOR_LOCKED) == 0)) {
if (cache->is_dirty) {
gpencil_batch_cache_check_free_slots(ob);
- cache->batch_edit[cache->cache_idx] = DRW_gpencil_get_edit_geom(gps, ts->gp_sculpt.alpha, gpd->flag);
+ cache->batch_edit[cache->cache_idx] = DRW_gpencil_get_edit_geom(gps, edit_alpha, gpd->flag);
}
if (cache->batch_edit[cache->cache_idx]) {
if ((obact) && (obact == ob)) {
More information about the Bf-blender-cvs
mailing list