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:
authorJoshua Leung <aligorith@gmail.com>2014-10-31 09:17:46 +0300
committerJoshua Leung <aligorith@gmail.com>2014-10-31 09:17:46 +0300
commit027824714ef70f95b2c40167cc9487d3d7ec624e (patch)
tree583134204cd53166c988758d6eaf7fd6292fe32e
parentdfc7423a265fcb7c4cf72013badfc0fa567afe9f (diff)
Code Cleanup: Remove some redundant operationsGPencil_FillStrokes
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 078c0fc0427..3dfd66c0545 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -965,7 +965,6 @@ static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy,
bool debug = (gpl->flag & GP_LAYER_DRAWDEBUG) ? true : false;
short lthick = gpl->thickness;
- float color[4], tcolor[4];
/* don't draw layer if hidden */
if (gpl->flag & GP_LAYER_HIDE)
@@ -978,9 +977,6 @@ static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy,
/* set color, stroke thickness, and point size */
glLineWidth(lthick);
- copy_v4_v4(color, gpl->color); // just for copying 4 array elements
- copy_v4_v4(tcolor, gpl->color); // additional copy of color (for ghosting)
- glColor4fv(color);
glPointSize((float)(gpl->thickness + 2));
/* apply xray layer setting */
@@ -1004,8 +1000,7 @@ static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy,
}
/* draw the strokes already in active frame */
- tcolor[3] = color[3];
- gp_draw_strokes(gpf, offsx, offsy, winx, winy, dflag, debug, lthick, tcolor, gpl->fill);
+ gp_draw_strokes(gpf, offsx, offsy, winx, winy, dflag, debug, lthick, gpl->color, gpl->fill);
/* Draw verts of selected strokes
* - locked layers can't be edited, so there's no point showing these verts
@@ -1014,7 +1009,7 @@ static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy,
/* XXX: perhaps we don't want to show these when users are drawing... */
if ((gpl->flag & GP_LAYER_LOCKED) == 0) {
gp_draw_strokes_edit(gpf, offsx, offsy, winx, winy, dflag,
- (gpl->color[3] < 0.95f) ? tcolor : NULL);
+ (gpl->color[3] < 0.95f) ? gpl->color : NULL);
}
/* Check if may need to draw the active stroke cache, only if this layer is the active layer