[Bf-blender-cvs] [6bc7180ca9e] greasepencil-object: GP: Hide Primitive Gizmos with Overrlay switches

Antonioya noreply at git.blender.org
Thu Dec 13 23:07:31 CET 2018


Commit: 6bc7180ca9eb2b3df398a9710ea97ea24cade428
Author: Antonioya
Date:   Thu Dec 13 23:07:22 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB6bc7180ca9eb2b3df398a9710ea97ea24cade428

GP: Hide Primitive Gizmos with Overrlay switches

If disable Gizmo or Tool Gizmo the manipulators are not displayed.

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

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 9e7a9c49c23..f7c9b597f66 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -1161,6 +1161,8 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data, void *vedata, T
 {
 	GPENCIL_PassList *psl = ((GPENCIL_Data *)vedata)->psl;
 	GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl;
+	const DRWContextState *draw_ctx = DRW_context_state_get();
+	View3D *v3d = draw_ctx->v3d;
 	Brush *brush = BKE_paint_brush(&ts->gp_paint->paint);
 	bGPdata *gpd_eval = ob->data;
 	/* need the original to avoid cow overhead while drawing */
@@ -1259,7 +1261,9 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data, void *vedata, T
 
 	/* control points */
 	if ((gpd->runtime.tot_cp_points > 0) &&
-		((gpd->runtime.sbuffer_sflag & GP_STROKE_ERASER) == 0))
+		((gpd->runtime.sbuffer_sflag & GP_STROKE_ERASER) == 0) &&
+		((v3d->gizmo_flag & V3D_GIZMO_HIDE) == 0) &&
+		((v3d->gizmo_flag & V3D_GIZMO_HIDE_TOOL) == 0))
 	{
 
 		DRWShadingGroup *shgrp = DRW_shgroup_create(



More information about the Bf-blender-cvs mailing list