[Bf-blender-cvs] [ecc2ec724e3] master: Cleanup: quiet shadow warning

Campbell Barton noreply at git.blender.org
Tue May 3 01:49:28 CEST 2022


Commit: ecc2ec724e35a60e0e85036161d4b3a40dd60524
Author: Campbell Barton
Date:   Tue May 3 09:43:56 2022 +1000
Branches: master
https://developer.blender.org/rBecc2ec724e35a60e0e85036161d4b3a40dd60524

Cleanup: quiet shadow warning

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

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

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

diff --git a/source/blender/editors/gpencil/gpencil_sculpt_paint.c b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
index 7a511c33673..ae40c76916b 100644
--- a/source/blender/editors/gpencil/gpencil_sculpt_paint.c
+++ b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
@@ -1601,8 +1601,6 @@ static bool gpencil_sculpt_brush_do_frame(bContext *C,
   BKE_gpencil_layer_transform_matrix_get(gso->depsgraph, gso->object, gpl, bound_mat);
 
   LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
-    bGPDstroke *gps_active = (gps->runtime.gps_orig) ? gps->runtime.gps_orig : gps;
-
     /* skip strokes that are invalid for current view */
     if (ED_gpencil_stroke_can_use(C, gps) == false) {
       continue;
@@ -1612,8 +1610,11 @@ static bool gpencil_sculpt_brush_do_frame(bContext *C,
       continue;
     }
 
-    if ((is_automasking) && (!BLI_ghash_haskey(gso->automasking_strokes, gps_active))) {
-      continue;
+    {
+      bGPDstroke *gps_active = (gps->runtime.gps_orig) ? gps->runtime.gps_orig : gps;
+      if ((is_automasking) && (!BLI_ghash_haskey(gso->automasking_strokes, gps_active))) {
+        continue;
+      }
     }
 
     /* Check if the stroke collide with brush. */



More information about the Bf-blender-cvs mailing list