[Bf-blender-cvs] [2719824a2e1] greasepencil-object: GP: Add missing Main Overlay switch to previous commit

Antonioya noreply at git.blender.org
Thu Dec 13 23:17:34 CET 2018


Commit: 2719824a2e1113b6640f578b35723063be5c1a3f
Author: Antonioya
Date:   Thu Dec 13 23:17:25 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB2719824a2e1113b6640f578b35723063be5c1a3f

GP: Add missing Main Overlay switch to previous commit

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

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 f7c9b597f66..78c78bdb296 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -1163,6 +1163,7 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data, void *vedata, T
 	GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl;
 	const DRWContextState *draw_ctx = DRW_context_state_get();
 	View3D *v3d = draw_ctx->v3d;
+	const bool overlay = v3d != NULL ? (bool)((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) : true;
 	Brush *brush = BKE_paint_brush(&ts->gp_paint->paint);
 	bGPdata *gpd_eval = ob->data;
 	/* need the original to avoid cow overhead while drawing */
@@ -1260,7 +1261,7 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data, void *vedata, T
 	}
 
 	/* control points */
-	if ((gpd->runtime.tot_cp_points > 0) &&
+	if ((overlay) && (gpd->runtime.tot_cp_points > 0) &&
 		((gpd->runtime.sbuffer_sflag & GP_STROKE_ERASER) == 0) &&
 		((v3d->gizmo_flag & V3D_GIZMO_HIDE) == 0) &&
 		((v3d->gizmo_flag & V3D_GIZMO_HIDE_TOOL) == 0))



More information about the Bf-blender-cvs mailing list