diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-25 20:03:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-25 20:03:08 +0400 |
commit | f83ea3fa85ed79f85bdf5eda9a35b886a2d9159c (patch) | |
tree | 8f63706475def55835de77da94f45a3afc4ed6de /source/blender/editors/mask/mask_edit.c | |
parent | c730125f3edeaab0276ae4c2d4ed2a5c5fbc72eb (diff) |
fix some crashes with mask/image transfor, a few more areas working now.
Diffstat (limited to 'source/blender/editors/mask/mask_edit.c')
-rw-r--r-- | source/blender/editors/mask/mask_edit.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/source/blender/editors/mask/mask_edit.c b/source/blender/editors/mask/mask_edit.c index 197e433eff4..ca5de41c392 100644 --- a/source/blender/editors/mask/mask_edit.c +++ b/source/blender/editors/mask/mask_edit.c @@ -48,6 +48,8 @@ #include "ED_sequencer.h" #include "ED_transform.h" +#include "UI_view2d.h" + #include "RNA_access.h" #include "mask_intern.h" /* own include */ @@ -101,11 +103,17 @@ void ED_mask_mouse_pos(const bContext *C, wmEvent *event, float co[2]) break; } case SPACE_SEQ: - zero_v2(co); /* MASKTODO */ + { + ARegion *ar = CTX_wm_region(C); + UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &co[0], &co[1]); break; + } case SPACE_IMAGE: - zero_v2(co); /* MASKTODO */ + { + ARegion *ar = CTX_wm_region(C); + UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &co[0], &co[1]); break; + } default: /* possible other spaces from which mask editing is available */ BLI_assert(0); @@ -139,8 +147,11 @@ void ED_mask_point_pos(const bContext *C, float x, float y, float *xr, float *yr zero_v2(co); /* MASKTODO */ break; case SPACE_IMAGE: + { + //SpaceImage *sima = sa->spacedata.first; zero_v2(co); /* MASKTODO */ break; + } default: /* possible other spaces from which mask editing is available */ BLI_assert(0); @@ -251,8 +262,8 @@ void ED_mask_aspect(const bContext *C, float *aspx, float *aspy) } case SPACE_IMAGE: { - // SpaceImage *sima = sa->spacedata.first; - *aspx = *aspy = 1.0f; /* MASKTODO - image aspect? */ + SpaceImage *sima = sa->spacedata.first; + ED_space_image_uv_aspect(sima, aspx, aspy); break; } default: |