[Bf-blender-cvs] [4d889897bae] master: Fix T63592 issue with control points.

Antonioya noreply at git.blender.org
Tue Apr 30 11:27:40 CEST 2019


Commit: 4d889897bae2b47b330913da0170e089df9a8130
Author: Antonioya
Date:   Tue Apr 30 11:27:33 2019 +0200
Branches: master
https://developer.blender.org/rB4d889897bae2b47b330913da0170e089df9a8130

Fix T63592 issue with control points.

This is a missing fix in previous commit of this task.

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

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 f28c6fa11b5..1f50b76ac82 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -1456,6 +1456,7 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data,
   View3D *v3d = draw_ctx->v3d;
   const bool overlay = v3d != NULL ? (bool)((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) : true;
   Brush *brush = BKE_paint_brush(&ts->gp_paint->paint);
+  const bool is_paint_tool = (bool)((brush) && (brush->gpencil_tool == GPAINT_TOOL_DRAW));
   bGPdata *gpd_eval = ob->data;
   /* need the original to avoid cow overhead while drawing */
   bGPdata *gpd = (bGPdata *)DEG_get_original_id(&gpd_eval->id);
@@ -1581,7 +1582,7 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data,
   const bool is_show_gizmo = (((v3d->gizmo_flag & V3D_GIZMO_HIDE) == 0) &&
                               ((v3d->gizmo_flag & V3D_GIZMO_HIDE_TOOL) == 0));
 
-  if ((overlay) && (is_cppoint || is_speed_guide) && (is_show_gizmo) &&
+  if ((overlay) && (is_paint_tool) && (is_cppoint || is_speed_guide) && (is_show_gizmo) &&
       ((gpd->runtime.sbuffer_sflag & GP_STROKE_ERASER) == 0)) {
     DRWShadingGroup *shgrp = DRW_shgroup_create(e_data->gpencil_edit_point_sh, psl->drawing_pass);
     const float *viewport_size = DRW_viewport_size_get();



More information about the Bf-blender-cvs mailing list