diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-11-06 04:30:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-11-06 04:32:54 +0300 |
commit | aa3a4973a30ff668a62447e18ac41f6c916b4a8b (patch) | |
tree | 1b24cc55995ba8b3d72aaabd9400a3e1e030d540 /source/blender/editors/transform | |
parent | 7cb20d841da16d0bffb63154403267500e9941f5 (diff) |
Cleanup: use ELEM macro
Diffstat (limited to 'source/blender/editors/transform')
4 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index b622ef79c64..77ce9c10c77 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1947,7 +1947,7 @@ int transformEnd(bContext *C, TransInfo *t) t->context = C; - if (t->state != TRANS_STARTING && t->state != TRANS_RUNNING) { + if (!ELEM(t->state, TRANS_STARTING, TRANS_RUNNING)) { /* handle restoring objects */ if (t->state == TRANS_CANCEL) { exit_code = OPERATOR_CANCELLED; diff --git a/source/blender/editors/transform/transform_convert_armature.c b/source/blender/editors/transform/transform_convert_armature.c index a14ff6c500d..a7301161570 100644 --- a/source/blender/editors/transform/transform_convert_armature.c +++ b/source/blender/editors/transform/transform_convert_armature.c @@ -1504,7 +1504,7 @@ static void bone_children_clear_transflag(int mode, short around, ListBase *lb) if ((bone->flag & BONE_HINGE) && (bone->flag & BONE_CONNECTED)) { bone->flag |= BONE_HINGE_CHILD_TRANSFORM; } - else if ((bone->flag & BONE_TRANSFORM) && (mode == TFM_ROTATION || mode == TFM_TRACKBALL) && + else if ((bone->flag & BONE_TRANSFORM) && (ELEM(mode, TFM_ROTATION, TFM_TRACKBALL)) && (around == V3D_AROUND_LOCAL_ORIGINS)) { bone->flag |= BONE_TRANSFORM_CHILD; } diff --git a/source/blender/editors/transform/transform_convert_curve.c b/source/blender/editors/transform/transform_convert_curve.c index 90257b28f55..d2feb966657 100644 --- a/source/blender/editors/transform/transform_convert_curve.c +++ b/source/blender/editors/transform/transform_convert_curve.c @@ -406,7 +406,7 @@ void createTransCurveVerts(TransInfo *t) } td->ext = NULL; - if (t->mode == TFM_CURVE_SHRINKFATTEN || t->mode == TFM_RESIZE) { + if (ELEM(t->mode, TFM_CURVE_SHRINKFATTEN, TFM_RESIZE)) { td->val = &(bp->radius); td->ival = bp->radius; } diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 9f39099ea4b..c455dd55b8a 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -541,7 +541,7 @@ static bool transform_poll_property(const bContext *UNUSED(C), { /* Hide orientation axis if no constraints are set, since it wont be used. */ PropertyRNA *prop_con = RNA_struct_find_property(op->ptr, "orient_type"); - if (prop_con != NULL && (prop_con != prop)) { + if (!ELEM(prop_con, NULL, prop)) { if (STRPREFIX(prop_id, "constraint")) { /* Special case: show constraint axis if we don't have values, |