[Bf-blender-cvs] [ec9ec3b1342] lanpr-under-gp: Cleanup: Pointer assignment cast and modifier iteration.
YimingWu
noreply at git.blender.org
Sun Jun 28 17:06:44 CEST 2020
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);
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list