diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-27 19:15:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-27 19:15:55 +0400 |
commit | f1acd6ac3e78aa4b898ee310dae2814015616e5f (patch) | |
tree | f9e12a8ac3f65b75465920ec188803751fe06c8b /source/blender/editors/mask/mask_edit.c | |
parent | 49e0c832e16195d8a656798830a63074eb6cd6c7 (diff) |
code cleanup: pass mouse position as int[2] rather then wmEvent
Diffstat (limited to 'source/blender/editors/mask/mask_edit.c')
-rw-r--r-- | source/blender/editors/mask/mask_edit.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/mask/mask_edit.c b/source/blender/editors/mask/mask_edit.c index dc41424b1d9..85a8ae11111 100644 --- a/source/blender/editors/mask/mask_edit.c +++ b/source/blender/editors/mask/mask_edit.c @@ -90,20 +90,21 @@ int ED_maskedit_mask_poll(bContext *C) /********************** registration *********************/ -void ED_mask_mouse_pos(ScrArea *sa, ARegion *ar, wmEvent *event, float co[2]) +/* takes event->mval */ +void ED_mask_mouse_pos(ScrArea *sa, ARegion *ar, const int mval[2], float co[2]) { if (sa) { switch (sa->spacetype) { case SPACE_CLIP: { SpaceClip *sc = sa->spacedata.first; - ED_clip_mouse_pos(sc, ar, event, co); + ED_clip_mouse_pos(sc, ar, mval, co); BKE_mask_coord_from_movieclip(sc->clip, &sc->user, co, co); break; } case SPACE_SEQ: { - UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &co[0], &co[1]); + UI_view2d_region_to_view(&ar->v2d, mval[0], mval[1], &co[0], &co[1]); break; } case SPACE_IMAGE: @@ -111,7 +112,7 @@ void ED_mask_mouse_pos(ScrArea *sa, ARegion *ar, wmEvent *event, float co[2]) float frame_size[2]; SpaceImage *sima = sa->spacedata.first; ED_space_image_get_size_fl(sima, frame_size); - ED_image_mouse_pos(sima, ar, event, co); + ED_image_mouse_pos(sima, ar, mval, co); BKE_mask_coord_from_frame(co, co, frame_size); break; } |