diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-04-11 07:43:05 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-04-11 07:43:05 +0300 |
commit | 1241e9170711acfa0fbf99d5289b0241f6db1c23 (patch) | |
tree | 92bc1bcd417605c771046cebd7741126e10700a0 /source/blender/gpencil_modifiers | |
parent | f9c0d7261a22d8d237e8cc23453c636c3a09c58b (diff) |
Cleanup: use ELEM, STREQ macros
Diffstat (limited to 'source/blender/gpencil_modifiers')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c | 3 | ||||
-rw-r--r-- | source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c | 8 |
2 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c index d6e151fd262..080a3caa32f 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c @@ -209,8 +209,7 @@ static void updateDepsgraph(GpencilModifierData *md, } else { FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN (ctx->scene->master_collection, ob, mode) { - if (ob->type == OB_MESH || ob->type == OB_MBALL || ob->type == OB_CURVE || - ob->type == OB_SURF || ob->type == OB_FONT) { + if (ELEM(ob->type, OB_MESH, OB_MBALL, OB_CURVE, OB_SURF, OB_FONT)) { if (ob->lineart.usage != OBJECT_LRT_EXCLUDE) { DEG_add_object_relation(ctx->node, ob, DEG_OB_COMP_GEOMETRY, "Line Art Modifier"); DEG_add_object_relation(ctx->node, ob, DEG_OB_COMP_TRANSFORM, "Line Art Modifier"); diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c index 49e0d03c459..3778e60d813 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c +++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c @@ -1504,8 +1504,7 @@ static void lineart_geometry_object_load(Depsgraph *dg, return; } - if (ob->type == OB_MESH || ob->type == OB_MBALL || ob->type == OB_CURVE || ob->type == OB_SURF || - ob->type == OB_FONT) { + if (ELEM(ob->type, OB_MESH, OB_MBALL, OB_CURVE, OB_SURF, OB_FONT)) { if (ob->type == OB_MESH) { use_mesh = DEG_get_evaluated_object(dg, ob)->data; @@ -1647,7 +1646,7 @@ static void lineart_geometry_object_load(Depsgraph *dg, if (usage == OBJECT_LRT_INTERSECTION_ONLY) { rt->flags |= LRT_TRIANGLE_INTERSECTION_ONLY; } - else if (usage == OBJECT_LRT_NO_INTERSECTION || usage == OBJECT_LRT_OCCLUSION_ONLY) { + else if (ELEM(usage, OBJECT_LRT_NO_INTERSECTION, OBJECT_LRT_OCCLUSION_ONLY)) { rt->flags |= LRT_TRIANGLE_NO_INTERSECTION; } @@ -1711,8 +1710,7 @@ static void lineart_geometry_object_load(Depsgraph *dg, LineartLineSegment *rls = lineart_mem_aquire(&rb->render_data_pool, sizeof(LineartLineSegment)); BLI_addtail(&la_e->segments, rls); - if (usage == OBJECT_LRT_INHERIT || usage == OBJECT_LRT_INCLUDE || - usage == OBJECT_LRT_NO_INTERSECTION) { + if (ELEM(usage, OBJECT_LRT_INHERIT, OBJECT_LRT_INCLUDE, OBJECT_LRT_NO_INTERSECTION)) { lineart_add_edge_to_list(rb, la_e); } |