From 4b955a60eda06526e3a793fd9bb3c942b641d877 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 20 Jun 2012 10:28:51 +0000 Subject: Cleanup up space clip API: - Remove clip/mask specific size/aspect getters, they shall just use the same size/aspect ratio. - Made size getter (and some other public functions) accept context instead of SpaceClip. Currently only SpaceClip is being get from this context, but later it'll be helpful when adding support of editing mask without opening clip in clip editor (in this case using render resolution for mask would be ideal, but this requires knowing scene in size getter). - Rearrange some functions in clip_editor.c for easier navigation in the file. --- source/blender/editors/mask/mask_select.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/mask/mask_select.c') diff --git a/source/blender/editors/mask/mask_select.c b/source/blender/editors/mask/mask_select.c index e34823278cb..e619277456e 100644 --- a/source/blender/editors/mask/mask_select.c +++ b/source/blender/editors/mask/mask_select.c @@ -581,8 +581,6 @@ static int circle_select_exec(bContext *C, wmOperator *op) MaskLayer *masklay; int i; - SpaceClip *sc = CTX_wm_space_clip(C); - ARegion *ar = CTX_wm_region(C); int x, y, radius, width, height, mode, change = FALSE; float zoomx, zoomy, offset[2], ellipse[2]; @@ -595,8 +593,8 @@ static int circle_select_exec(bContext *C, wmOperator *op) /* TODO - make generic! - this is SpaceClip only! */ /* compute ellipse and position in unified coordinates */ - ED_space_clip_get_clip_size(sc, &width, &height); - ED_space_clip_get_zoom(sc, ar, &zoomx, &zoomy); + ED_space_clip_get_size(C, &width, &height); + ED_space_clip_get_zoom(C, &zoomx, &zoomy); width = height = MAX2(width, height); ellipse[0] = width * zoomx / radius; -- cgit v1.2.3