[Bf-blender-cvs] [bb66837116e] greasepencil-object: Back opacity to annotations
Antonio Vazquez
noreply at git.blender.org
Tue Jul 24 11:30:34 CEST 2018
Commit: bb66837116e8a89522fc2b99cafb169378801b61
Author: Antonio Vazquez
Date: Tue Jul 24 11:30:26 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rBbb66837116e8a89522fc2b99cafb169378801b61
Back opacity to annotations
This parameter is usefull to reduce visibility of annotations and was removed by error in a previous commit.
===================================================================
M source/blender/editors/gpencil/annotate_draw.c
===================================================================
diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c
index 159d840b9f3..d761b4f5f8c 100644
--- a/source/blender/editors/gpencil/annotate_draw.c
+++ b/source/blender/editors/gpencil/annotate_draw.c
@@ -721,10 +721,16 @@ static void gp_draw_data_layers(
bGPdata *gpd, int offsx, int offsy, int winx, int winy,
int cfra, int dflag, float alpha)
{
+ float ink[4];
+
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
bool debug = (gpl->flag & GP_LAYER_DRAWDEBUG);
short lthick = gpl->thickness;
+ /* apply layer opacity */
+ copy_v3_v3(ink, gpl->color);
+ ink[3] = gpl->opacity;
+
/* don't draw layer if hidden */
if (gpl->flag & GP_LAYER_HIDE)
continue;
@@ -753,7 +759,7 @@ static void gp_draw_data_layers(
/* draw the strokes already in active frame */
- gp_draw_strokes(gpd, gpl, gpf, offsx, offsy, winx, winy, dflag, debug, lthick, gpl->color);
+ gp_draw_strokes(gpd, gpl, gpf, offsx, offsy, winx, winy, dflag, debug, lthick, ink);
/* Draw verts of selected strokes
* - when doing OpenGL renders, we don't want to be showing these, as that ends up flickering
@@ -784,7 +790,7 @@ static void gp_draw_data_layers(
*/
gp_draw_stroke_buffer(gpd->runtime.sbuffer,
gpd->runtime.sbuffer_size, lthick,
- dflag, gpd->runtime.sbuffer_sflag, gpl->color);
+ dflag, gpd->runtime.sbuffer_sflag, ink);
}
}
}
More information about the Bf-blender-cvs
mailing list