[Bf-blender-cvs] [1e3e8735266] greasepencil-edit-curve: GPencil: Check if layer is locked for Handles

Antonio Vazquez noreply at git.blender.org
Sun Sep 20 18:34:25 CEST 2020


Commit: 1e3e8735266634aafdffcc73c2a40d4c92fe379a
Author: Antonio Vazquez
Date:   Sun Sep 20 18:34:22 2020 +0200
Branches: greasepencil-edit-curve
https://developer.blender.org/rB1e3e8735266634aafdffcc73c2a40d4c92fe379a

GPencil: Check if layer is locked for Handles

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

M	source/blender/draw/intern/draw_cache_impl_gpencil.c

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

diff --git a/source/blender/draw/intern/draw_cache_impl_gpencil.c b/source/blender/draw/intern/draw_cache_impl_gpencil.c
index 0031b3489dd..0a80f7df877 100644
--- a/source/blender/draw/intern/draw_cache_impl_gpencil.c
+++ b/source/blender/draw/intern/draw_cache_impl_gpencil.c
@@ -734,11 +734,15 @@ static void gpencil_edit_stroke_iter_cb(bGPDlayer *gpl,
   vert_ptr->weight = gpencil_point_edit_weight(dvert, 0, iter->vgindex);
 }
 
-static void gpencil_edit_curve_stroke_count_cb(bGPDlayer *UNUSED(gpl),
+static void gpencil_edit_curve_stroke_count_cb(bGPDlayer *gpl,
                                                bGPDframe *UNUSED(gpf),
                                                bGPDstroke *gps,
                                                void *thunk)
 {
+  if (gpl->flag & GP_LAYER_LOCKED) {
+    return;
+  }
+
   gpIterData *iter = (gpIterData *)thunk;
 
   if (gps->editcurve == NULL) {



More information about the Bf-blender-cvs mailing list