diff options
author | Campbell Barton <campbell@blender.org> | 2022-10-07 14:52:53 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-10-07 14:55:03 +0300 |
commit | 331f8500569df9b3b2aa776c5bcaad7b99c57295 (patch) | |
tree | 93547846177ff3415f9564ca54cb8f13433755cf /source/blender/editors/space_view3d | |
parent | 11abeae99fdbfc8f047c4a3c1d2b9b8c47883516 (diff) |
Cleanup: redundant parenthesis
Diffstat (limited to 'source/blender/editors/space_view3d')
6 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index b783b67357c..4153f19f8be 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -1821,7 +1821,7 @@ static int view3d_object_mode_menu(bContext *C, wmOperator *op) BKE_report(op->reports, RPT_WARNING, "No active object found"); return OPERATOR_CANCELLED; } - if (((ob->mode & OB_MODE_EDIT) == 0) && (ELEM(ob->type, OB_ARMATURE))) { + if (((ob->mode & OB_MODE_EDIT) == 0) && ELEM(ob->type, OB_ARMATURE)) { ED_object_mode_set(C, (ob->mode == OB_MODE_OBJECT) ? OB_MODE_POSE : OB_MODE_OBJECT); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_view3d/view3d_gizmo_light.c b/source/blender/editors/space_view3d/view3d_gizmo_light.c index df653f9a6e5..4401dbf7935 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_light.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_light.c @@ -255,7 +255,7 @@ static bool WIDGETGROUP_light_target_poll(const bContext *C, wmGizmoGroupType *U Object *ob = base->object; if (ob->type == OB_LAMP) { Light *la = ob->data; - return (ELEM(la->type, LA_SUN, LA_SPOT, LA_AREA)); + return ELEM(la->type, LA_SUN, LA_SPOT, LA_AREA); } #if 0 else if (ob->type == OB_CAMERA) { diff --git a/source/blender/editors/space_view3d/view3d_navigate_ndof.c b/source/blender/editors/space_view3d/view3d_navigate_ndof.c index 893c9008f23..29e63a72daf 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_ndof.c +++ b/source/blender/editors/space_view3d/view3d_navigate_ndof.c @@ -32,7 +32,7 @@ static bool ndof_has_translate(const wmNDOFMotionData *ndof, const View3D *v3d, const RegionView3D *rv3d) { - return !is_zero_v3(ndof->tvec) && (!ED_view3d_offset_lock_check(v3d, rv3d)); + return !is_zero_v3(ndof->tvec) && !ED_view3d_offset_lock_check(v3d, rv3d); } static bool ndof_has_rotate(const wmNDOFMotionData *ndof, const RegionView3D *rv3d) diff --git a/source/blender/editors/space_view3d/view3d_navigate_zoom_border.c b/source/blender/editors/space_view3d/view3d_navigate_zoom_border.c index 7cafc3dfd42..fe83bbb7c59 100644 --- a/source/blender/editors/space_view3d/view3d_navigate_zoom_border.c +++ b/source/blender/editors/space_view3d/view3d_navigate_zoom_border.c @@ -96,8 +96,8 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } /* convert border to 3d coordinates */ - if ((!ED_view3d_unproject_v3(region, cent[0], cent[1], depth_close, p)) || - (!ED_view3d_unproject_v3(region, rect.xmin, rect.ymin, depth_close, p_corner))) { + if (!ED_view3d_unproject_v3(region, cent[0], cent[1], depth_close, p) || + !ED_view3d_unproject_v3(region, rect.xmin, rect.ymin, depth_close, p_corner)) { return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index a5ecef69ff8..ee6b1886dc2 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -388,7 +388,7 @@ static bool snap_selected_to_location(bContext *C, mul_v3_m4v3(snap_target_local, ob->imat, snap_target_global); for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { - if ((pchan->bone->flag & BONE_SELECTED) && (PBONE_VISIBLE(arm, pchan->bone)) && + if ((pchan->bone->flag & BONE_SELECTED) && PBONE_VISIBLE(arm, pchan->bone) && /* if the bone has a parent and is connected to the parent, * don't do anything - will break chain unless we do auto-ik. */ diff --git a/source/blender/editors/space_view3d/view3d_utils.c b/source/blender/editors/space_view3d/view3d_utils.c index cb716391fb2..1fc16939f3f 100644 --- a/source/blender/editors/space_view3d/view3d_utils.c +++ b/source/blender/editors/space_view3d/view3d_utils.c @@ -271,8 +271,8 @@ void ED_view3d_clipping_calc( /* four clipping planes and bounding volume */ /* first do the bounding volume */ for (int val = 0; val < 4; val++) { - float xs = (ELEM(val, 0, 3)) ? rect->xmin : rect->xmax; - float ys = (ELEM(val, 0, 1)) ? rect->ymin : rect->ymax; + float xs = ELEM(val, 0, 3) ? rect->xmin : rect->xmax; + float ys = ELEM(val, 0, 1) ? rect->ymin : rect->ymax; ED_view3d_unproject_v3(region, xs, ys, 0.0, bb->vec[val]); ED_view3d_unproject_v3(region, xs, ys, 1.0, bb->vec[4 + val]); @@ -544,7 +544,7 @@ bool ED_view3d_camera_view_pan(ARegion *region, const float event_ofs[2]) bool ED_view3d_camera_lock_check(const View3D *v3d, const RegionView3D *rv3d) { - return ((v3d->camera) && (!ID_IS_LINKED(v3d->camera)) && (v3d->flag2 & V3D_LOCK_CAMERA) && + return ((v3d->camera) && !ID_IS_LINKED(v3d->camera) && (v3d->flag2 & V3D_LOCK_CAMERA) && (rv3d->persp == RV3D_CAMOB)); } |