Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-11-06 04:30:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-06 04:32:54 +0300
commitaa3a4973a30ff668a62447e18ac41f6c916b4a8b (patch)
tree1b24cc55995ba8b3d72aaabd9400a3e1e030d540 /source/blender/editors/gpencil/gpencil_utils.c
parent7cb20d841da16d0bffb63154403267500e9941f5 (diff)
Cleanup: use ELEM macro
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_utils.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index 28a90a26a9d..3e16980c651 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -555,7 +555,7 @@ bool ED_gpencil_stroke_can_use_direct(const ScrArea *area, const bGPDstroke *gps
/* filter stroke types by flags + spacetype */
if (gps->flag & GP_STROKE_3DSPACE) {
/* 3D strokes - only in 3D view */
- return ((area->spacetype == SPACE_VIEW3D) || (area->spacetype == SPACE_PROPERTIES));
+ return (ELEM(area->spacetype, SPACE_VIEW3D, SPACE_PROPERTIES));
}
if (gps->flag & GP_STROKE_2DIMAGE) {
/* Special "image" strokes - only in Image Editor */
@@ -1429,7 +1429,7 @@ void ED_gpencil_reset_layers_parent(Depsgraph *depsgraph, Object *obact, bGPdata
LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
if (gpl->parent != NULL) {
/* calculate new matrix */
- if ((gpl->partype == PAROBJECT) || (gpl->partype == PARSKEL)) {
+ if (ELEM(gpl->partype, PAROBJECT, PARSKEL)) {
invert_m4_m4(cur_mat, gpl->parent->obmat);
copy_v3_v3(gpl_loc, obact->obmat[3]);
}
@@ -2289,7 +2289,7 @@ static void gpencil_insert_point(
gpencil_copy_points(gps, pt, pt_final, i, i2);
/* create new point duplicating point and copy location */
- if ((i == a_idx) || (i == b_idx)) {
+ if (ELEM(i, a_idx, b_idx)) {
i2++;
pt_final = &gps->points[i2];
gpencil_copy_points(gps, pt, pt_final, i, i2);