[Bf-blender-cvs] [e14b871] GPencil_EditStrokes: Put in place defines for not showing GP onionskins when animating

Joshua Leung noreply at git.blender.org
Tue Oct 21 15:23:42 CEST 2014


Commit: e14b8711b353464750a1f7e8d54a113119cf5dc2
Author: Joshua Leung
Date:   Fri Oct 17 13:01:38 2014 +1300
Branches: GPencil_EditStrokes
https://developer.blender.org/rBe14b8711b353464750a1f7e8d54a113119cf5dc2

Put in place defines for not showing GP onionskins when animating

Added some defnies which will hide GP onionskins when animation playback is running.
These don't work yet though as there's no way to access that information from
the drawing callbacks which call the GP drawing code.

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

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

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

diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index cc3c954..e7dc084 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -75,6 +75,7 @@ typedef enum eDrawStrokeFlags {
 	GP_DRAWDATA_ONLYI2D     = (1 << 3),   /* only draw 'image' strokes */
 	GP_DRAWDATA_IEDITHACK   = (1 << 4),   /* special hack for drawing strokes in Image Editor (weird coordinates) */
 	GP_DRAWDATA_NO_XRAY     = (1 << 5),   /* don't draw xray in 3D view (which is default) */
+	GP_DRAWDATA_NO_ONIONS   = (1 << 6),	  /* no onionskins should be drawn (for animation playback) */
 } eDrawStrokeFlags;
 
 
@@ -791,7 +792,7 @@ static void gp_draw_data(bGPdata *gpd, int offsx, int offsy, int winx, int winy,
 		else dflag &= ~GP_DRAWDATA_NO_XRAY;
 		
 		/* draw 'onionskins' (frame left + right) */
-		if (gpl->flag & GP_LAYER_ONIONSKIN) {
+		if ((gpl->flag & GP_LAYER_ONIONSKIN) && !(dflag & GP_DRAWDATA_NO_ONIONS)) {
 			/* Drawing method - only immediately surrounding (gstep = 0),
 			 * or within a frame range on either side (gstep > 0)
 			 */




More information about the Bf-blender-cvs mailing list