Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-07-26 00:39:49 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-26 00:39:49 +0400
commit2b133b14ab1b37f80f94a7a411ee116e095c9b8d (patch)
treef5651e0b9d13fe68946e0362a69083bd14f3f5f4 /source/blender/editors/mask
parent8ad3e7396597ffcf56f3ad74c00dfc6fdcd504df (diff)
mask/image viewer now works with non 1:1 image aspect, editing masks in the image viewer should be generally usable now though still some TODO's left.
Diffstat (limited to 'source/blender/editors/mask')
-rw-r--r--source/blender/editors/mask/mask_edit.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/editors/mask/mask_edit.c b/source/blender/editors/mask/mask_edit.c
index 6667b9b69a5..6a5e5c03345 100644
--- a/source/blender/editors/mask/mask_edit.c
+++ b/source/blender/editors/mask/mask_edit.c
@@ -110,8 +110,15 @@ void ED_mask_mouse_pos(const bContext *C, wmEvent *event, float co[2])
}
case SPACE_IMAGE:
{
+ int width, height;
+ float frame_size[2];
+ SpaceImage *sima = sa->spacedata.first;
ARegion *ar = CTX_wm_region(C);
- UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &co[0], &co[1]);
+ ED_space_image_get_size(sima, &width, &height);
+ frame_size[0] = width;
+ frame_size[1] = height;
+ ED_image_mouse_pos(sima, ar, event, co);
+ BKE_mask_coord_from_frame(co, co, frame_size);
break;
}
default: