Commit: ec9ec3b1342a1773763dfaa770104c65457c7fb3
Author: YimingWu
Date:   Sun Jun 28 23:06:39 2020 +0800
Branches: lanpr-under-gp
https://developer.blender.org/rBec9ec3b1342a1773763dfaa770104c65457c7fb3

Cleanup: Pointer assignment cast and modifier iteration.

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

M       source/blender/editors/lineart/lineart_cpu.c

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

diff --git a/source/blender/editors/lineart/lineart_cpu.c 
b/source/blender/editors/lineart/lineart_cpu.c
index 91b23fd2dd1..b7a0357d787 100644
--- a/source/blender/editors/lineart/lineart_cpu.c
+++ b/source/blender/editors/lineart/lineart_cpu.c
@@ -2680,10 +2680,12 @@ static int lineart_get_max_occlusion_level(Depsgraph 
*dg)
                          DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY | 
DEG_ITER_OBJECT_FLAG_VISIBLE |
                              DEG_ITER_OBJECT_FLAG_DUPLI | 
DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET) {
     if (o->type == OB_GPENCIL) {
-      for (md = o->greasepencil_modifiers.first; md; md = md->next) {
-        lmd = md;
-        max = MAX2(lmd->level_start, lmd->level_end);
-        max_occ = MAX2(max, max_occ);
+      LISTBASE_FOREACH (GpencilModifierData *, md, &o->greasepencil_modifiers) 
{
+        if (md->type == eGpencilModifierType_Lineart) {
+          lmd = (LineartGpencilModifierData *)md;
+          max = MAX2(lmd->level_start, lmd->level_end);
+          max_occ = MAX2(max, max_occ);
+        }
       }
     }
   }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to