diff options
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 19 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_user_menu.c | 2 | ||||
-rw-r--r-- | source/blender/editors/screen/screendump.c | 2 |
4 files changed, 12 insertions, 13 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index bc7006d2ac7..f06e2bd4f3c 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1641,7 +1641,7 @@ void ED_screen_animation_timer(bContext *C, int redraws, int sync, int enable) spacetype = area->spacetype; } - sad->from_anim_edit = (ELEM(spacetype, SPACE_GRAPH, SPACE_ACTION, SPACE_NLA)); + sad->from_anim_edit = ELEM(spacetype, SPACE_GRAPH, SPACE_ACTION, SPACE_NLA); screen->animtimer->customdata = sad; } diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index e04cf5c6d68..6a910170e44 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -241,7 +241,7 @@ bool ED_operator_animview_active(bContext *C) { if (ED_operator_areaactive(C)) { SpaceLink *sl = (SpaceLink *)CTX_wm_space_data(C); - if (sl && (ELEM(sl->spacetype, SPACE_SEQ, SPACE_ACTION, SPACE_NLA, SPACE_GRAPH))) { + if (sl && ELEM(sl->spacetype, SPACE_SEQ, SPACE_ACTION, SPACE_NLA, SPACE_GRAPH)) { return true; } } @@ -834,8 +834,7 @@ static AZone *area_actionzone_refresh_xy(ScrArea *area, const int xy[2], const b az->alpha = 1.0f; } else if (mouse_sq < fadeout_sq) { - az->alpha = 1.0f - - ((float)(mouse_sq - fadein_sq)) / ((float)(fadeout_sq - fadein_sq)); + az->alpha = 1.0f - (float)(mouse_sq - fadein_sq) / (float)(fadeout_sq - fadein_sq); } else { az->alpha = 0.0f; @@ -2277,8 +2276,8 @@ static int area_split_invoke(bContext *C, wmOperator *op, const wmEvent *event) } /* The factor will be close to 1.0f when near the top-left and the bottom-right corners. */ - const float factor_v = ((float)(event->xy[1] - sad->sa1->v1->vec.y)) / (float)sad->sa1->winy; - const float factor_h = ((float)(event->xy[0] - sad->sa1->v1->vec.x)) / (float)sad->sa1->winx; + const float factor_v = (float)(event->xy[1] - sad->sa1->v1->vec.y) / (float)sad->sa1->winy; + const float factor_h = (float)(event->xy[0] - sad->sa1->v1->vec.x) / (float)sad->sa1->winx; const bool is_left = factor_v < 0.5f; const bool is_bottom = factor_h < 0.5f; const bool is_right = !is_left; @@ -2316,11 +2315,11 @@ static int area_split_invoke(bContext *C, wmOperator *op, const wmEvent *event) dir_axis = RNA_property_enum_get(op->ptr, prop_dir); if (dir_axis == SCREEN_AXIS_H) { RNA_property_float_set( - op->ptr, prop_factor, ((float)(event->xy[0] - area->v1->vec.x)) / (float)area->winx); + op->ptr, prop_factor, (float)(event->xy[0] - area->v1->vec.x) / (float)area->winx); } else { RNA_property_float_set( - op->ptr, prop_factor, ((float)(event->xy[1] - area->v1->vec.y)) / (float)area->winy); + op->ptr, prop_factor, (float)(event->xy[1] - area->v1->vec.y) / (float)area->winy); } if (!area_split_init(C, op)) { @@ -4503,7 +4502,7 @@ static void screen_animation_region_tag_redraw( { /* Do follow time here if editor type supports it */ if ((redraws & TIME_FOLLOW) && - (screen_animation_region_supports_time_follow(area->spacetype, region->regiontype))) { + screen_animation_region_supports_time_follow(area->spacetype, region->regiontype)) { float w = BLI_rctf_size_x(®ion->v2d.cur); if (scene->r.cfra < region->v2d.cur.xmin) { region->v2d.cur.xmax = scene->r.cfra; @@ -4842,11 +4841,11 @@ int ED_screen_animation_play(bContext *C, int sync, int mode) static int screen_animation_play_exec(bContext *C, wmOperator *op) { - int mode = (RNA_boolean_get(op->ptr, "reverse")) ? -1 : 1; + int mode = RNA_boolean_get(op->ptr, "reverse") ? -1 : 1; int sync = -1; if (RNA_struct_property_is_set(op->ptr, "sync")) { - sync = (RNA_boolean_get(op->ptr, "sync")); + sync = RNA_boolean_get(op->ptr, "sync"); } return ED_screen_animation_play(C, sync, mode); diff --git a/source/blender/editors/screen/screen_user_menu.c b/source/blender/editors/screen/screen_user_menu.c index 01c208bf48d..a7ef40361ea 100644 --- a/source/blender/editors/screen/screen_user_menu.c +++ b/source/blender/editors/screen/screen_user_menu.c @@ -103,7 +103,7 @@ bUserMenuItem_Op *ED_screen_user_menu_item_find_operator(ListBase *lb, if (umi->type == USER_MENU_TYPE_OPERATOR) { bUserMenuItem_Op *umi_op = (bUserMenuItem_Op *)umi; if (STREQ(ot->idname, umi_op->op_idname) && (opcontext == umi_op->opcontext) && - (IDP_EqualsProperties(prop, umi_op->prop))) { + IDP_EqualsProperties(prop, umi_op->prop)) { return umi_op; } } diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index d46397180c5..569d6c2793c 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -196,7 +196,7 @@ static bool screenshot_draw_check_prop(PointerRNA *UNUSED(ptr), { const char *prop_id = RNA_property_identifier(prop); - return !(STREQ(prop_id, "filepath")); + return !STREQ(prop_id, "filepath"); } static void screenshot_draw(bContext *UNUSED(C), wmOperator *op) |