diff options
Diffstat (limited to 'source/blender/editors/screen/screen_ops.c')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 19 |
1 files changed, 9 insertions, 10 deletions
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); |