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_image | |
parent | 11abeae99fdbfc8f047c4a3c1d2b9b8c47883516 (diff) |
Cleanup: redundant parenthesis
Diffstat (limited to 'source/blender/editors/space_image')
5 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 98e555c7f77..c8efee504b4 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -654,7 +654,7 @@ static void uiblock_layer_pass_buttons(uiLayout *layout, /* view */ if (BLI_listbase_count_at_most(&rr->views, 2) > 1 && - ((!show_stereo) || (!RE_RenderResult_is_stereo(rr)))) { + ((!show_stereo) || !RE_RenderResult_is_stereo(rr))) { rview = BLI_findlink(&rr->views, iuser->view); display_name = rview ? rview->name : ""; diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 09bb895cffb..42ebed6ec3a 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -572,15 +572,15 @@ void draw_image_cache(const bContext *C, ARegion *region) float ED_space_image_zoom_level(const View2D *v2d, const int grid_dimension) { /* UV-space length per pixel */ - float xzoom = (v2d->cur.xmax - v2d->cur.xmin) / ((float)(v2d->mask.xmax - v2d->mask.xmin)); - float yzoom = (v2d->cur.ymax - v2d->cur.ymin) / ((float)(v2d->mask.ymax - v2d->mask.ymin)); + float xzoom = (v2d->cur.xmax - v2d->cur.xmin) / (float)(v2d->mask.xmax - v2d->mask.xmin); + float yzoom = (v2d->cur.ymax - v2d->cur.ymin) / (float)(v2d->mask.ymax - v2d->mask.ymin); /* Zoom_factor for UV/Image editor is calculated based on: * - Default grid size on startup, which is 256x256 pixels * - How blend factor for grid lines is set up in the fragment shader `grid_frag.glsl`. */ float zoom_factor; zoom_factor = (xzoom + yzoom) / 2.0f; /* Average for accuracy. */ - zoom_factor *= 256.0f / (powf(grid_dimension, 2)); + zoom_factor *= 256.0f / powf(grid_dimension, 2); return zoom_factor; } diff --git a/source/blender/editors/space_image/image_edit.c b/source/blender/editors/space_image/image_edit.c index c1ac5b7e7ef..0122e509c3b 100644 --- a/source/blender/editors/space_image/image_edit.c +++ b/source/blender/editors/space_image/image_edit.c @@ -408,7 +408,7 @@ void ED_space_image_scopes_update(const struct bContext *C, /* We also don't update scopes of render result during render. */ if (G.is_rendering) { const Image *image = sima->image; - if (image != NULL && (ELEM(image->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE))) { + if (image != NULL && ELEM(image->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE)) { return; } } diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 93e41589881..bb47ad5c6c0 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1485,7 +1485,7 @@ static bool image_open_draw_check_prop(PointerRNA *UNUSED(ptr), { const char *prop_id = RNA_property_identifier(prop); - return !(STR_ELEM(prop_id, "filepath", "directory", "filename")); + return !STR_ELEM(prop_id, "filepath", "directory", "filename"); } static void image_open_draw(bContext *UNUSED(C), wmOperator *op) diff --git a/source/blender/editors/space_image/image_sequence.c b/source/blender/editors/space_image/image_sequence.c index fbeef47e278..7108c258665 100644 --- a/source/blender/editors/space_image/image_sequence.c +++ b/source/blender/editors/space_image/image_sequence.c @@ -58,8 +58,8 @@ static void image_sequence_get_frame_ranges(wmOperator *op, ListBase *ranges) frame->framenr = BLI_path_sequence_decode(filename, head, tail, &digits); /* still in the same sequence */ - if (do_frame_range && (range != NULL) && (STREQLEN(base_head, head, FILE_MAX)) && - (STREQLEN(base_tail, tail, FILE_MAX))) { + if (do_frame_range && (range != NULL) && STREQLEN(base_head, head, FILE_MAX) && + STREQLEN(base_tail, tail, FILE_MAX)) { /* Set filepath to first frame in the range. */ if (frame->framenr < range_first_frame) { BLI_join_dirfile(range->filepath, sizeof(range->filepath), dir, filename); |