diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-10-20 02:45:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-10-20 03:16:43 +0300 |
commit | b280699078eee23bd8eb572668d6f0d8972d879a (patch) | |
tree | 8b6b8461938e71914d28e707137a8960f8a2d03c /source/blender/editors/object | |
parent | ef9269bd62f31e39d39cc59cd34354b53eae6661 (diff) |
Cleanup: use elem macros
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_add.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_bake.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index cf7c848ae24..9c6969110fd 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1487,7 +1487,7 @@ static void object_add_ui(bContext *UNUSED(C), wmOperator *op) uiItemR(layout, op->ptr, "type", 0, NULL, ICON_NONE); int type = RNA_enum_get(op->ptr, "type"); - if (type == GP_LRT_COLLECTION || type == GP_LRT_OBJECT || type == GP_LRT_SCENE) { + if (ELEM(type, GP_LRT_COLLECTION, GP_LRT_OBJECT, GP_LRT_SCENE)) { uiItemR(layout, op->ptr, "use_lights", 0, NULL, ICON_NONE); uiItemR(layout, op->ptr, "use_in_front", 0, NULL, ICON_NONE); bool in_front = RNA_boolean_get(op->ptr, "use_in_front"); diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index 3a10a423e91..1b6b0c78037 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -198,7 +198,7 @@ static bool multiresbake_check(bContext *C, wmOperator *op) ok = false; } - if (ibuf->rect_float && !(ibuf->channels == 0 || ibuf->channels == 4)) { + if (ibuf->rect_float && !(ELEM(ibuf->channels, 0, 4))) { ok = false; } |