diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-30 01:48:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-30 02:11:47 +0400 |
commit | 48446870a8981c28ee4c695823d12fb4419e56eb (patch) | |
tree | a9b80b92be135af86d451b60a6b55a4e33bf0fb0 /source/blender/editors/space_clip | |
parent | cdaff060265ef81539d04f6ad1f16762dbbba288 (diff) |
Code cleanup: remove redundant CTX calls
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/clip_ops.c | 8 | ||||
-rw-r--r-- | source/blender/editors/space_clip/space_clip.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops.c | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index 6ef4b12eadf..ae2bf7e00a7 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -780,7 +780,7 @@ static int view_all_exec(bContext *C, wmOperator *op) sc->xof = sc->yof = 0.0f; - ED_region_tag_redraw(CTX_wm_region(C)); + ED_region_tag_redraw(ar); return OPERATOR_FINISHED; } @@ -814,7 +814,7 @@ static int view_selected_exec(bContext *C, wmOperator *UNUSED(op)) sc->ylockof = 0.0f; ED_clip_view_selection(C, ar, 1); - ED_region_tag_redraw(CTX_wm_region(C)); + ED_region_tag_redraw(ar); return OPERATOR_FINISHED; } @@ -852,7 +852,7 @@ static void change_frame_apply(bContext *C, wmOperator *op) SUBFRA = 0.0f; /* do updates */ - sound_seek_scene(CTX_data_main(C), CTX_data_scene(C)); + sound_seek_scene(CTX_data_main(C), scene); WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); } @@ -1286,7 +1286,7 @@ static int clip_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op)) G.is_break = false; WM_jobs_start(CTX_wm_manager(C), wm_job); - ED_area_tag_redraw(CTX_wm_area(C)); + ED_area_tag_redraw(sa); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index b2af3c41a18..5eb60b126b2 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -1317,7 +1317,7 @@ static void dopesheet_area_draw(const bContext *C, ARegion *ar) /* time grid */ unit = (sc->flag & SC_SHOW_SECONDS) ? V2D_UNIT_SECONDS : V2D_UNIT_FRAMES; - grid = UI_view2d_grid_calc(CTX_data_scene(C), v2d, unit, V2D_GRID_CLAMP, + grid = UI_view2d_grid_calc(scene, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY, ar->winx, ar->winy); UI_view2d_grid_draw(v2d, grid, V2D_GRIDLINES_ALL); UI_view2d_grid_free(grid); diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 1cc416c2c29..04269e01489 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -1440,7 +1440,7 @@ static int track_markers_invoke(bContext *C, wmOperator *op, const wmEvent *UNUS clip = ED_space_clip_get_clip(sc); framenr = ED_space_clip_get_clip_frame_number(sc); - if (WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C), WM_JOB_TYPE_ANY)) { + if (WM_jobs_test(CTX_wm_manager(C), sa, WM_JOB_TYPE_ANY)) { /* only one tracking is allowed at a time */ return OPERATOR_CANCELLED; } @@ -1716,7 +1716,7 @@ static int solve_camera_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSE wmJob *wm_job; char error_msg[256] = "\0"; - if (WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C), WM_JOB_TYPE_ANY)) { + if (WM_jobs_test(CTX_wm_manager(C), sa, WM_JOB_TYPE_ANY)) { /* only one solve is allowed at a time */ return OPERATOR_CANCELLED; } @@ -3062,7 +3062,7 @@ static int frame_jump_exec(bContext *C, wmOperator *op) if (CFRA != sc->user.framenr) { CFRA = sc->user.framenr; - sound_seek_scene(CTX_data_main(C), CTX_data_scene(C)); + sound_seek_scene(CTX_data_main(C), scene); WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); } |