[Bf-blender-cvs] [31e6940] GPencil_EditStrokes: Don't show GP stroke verts when doing OpenGL renders

Joshua Leung noreply at git.blender.org
Wed Nov 26 12:48:15 CET 2014


Commit: 31e69403fccb6481b192d7fb0c494bfe157c19a9
Author: Joshua Leung
Date:   Thu Nov 27 00:42:29 2014 +1300
Branches: GPencil_EditStrokes
https://developer.blender.org/rB31e69403fccb6481b192d7fb0c494bfe157c19a9

Don't show GP stroke verts when doing OpenGL renders

===================================================================

M	source/blender/editors/gpencil/drawgpencil.c

===================================================================

diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 9a356e9..eb2ffb1 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -1011,12 +1011,17 @@ static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy,
 		gp_draw_strokes(gpf, offsx, offsy, winx, winy, dflag, debug, lthick, gpl->color, gpl->fill);
 		
 		/* Draw verts of selected strokes 
+		 *  - when doing OpenGL renders, we don't want to be showing these, as that ends up flickering
 		 * 	- locked layers can't be edited, so there's no point showing these verts
 		 *    as they will have no bearings on what gets edited
+		 *  - only show when in editmode, since operators shouldn't work otherwise
+		 *    (NOTE: doing it this way means that the toggling editmode shows visible change immediately)
 		 */
 		/* XXX: perhaps we don't want to show these when users are drawing... */
-		/* XXX: for now, we only show editing info when stroke can be edited */
-		if ((gpl->flag & GP_LAYER_LOCKED) == 0 && (gpd->flag & GP_DATA_STROKE_EDITMODE)) {
+		if ((G.f & G_RENDER_OGL) == 0 &&
+		    (gpl->flag & GP_LAYER_LOCKED) == 0 && 
+		    (gpd->flag & GP_DATA_STROKE_EDITMODE))
+		{
 			gp_draw_strokes_edit(gpf, offsx, offsy, winx, winy, dflag, 
 			                     (gpl->color[3] < 0.95f) ? gpl->color : NULL);
 		}




More information about the Bf-blender-cvs mailing list