diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-10-12 18:09:05 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-10-12 18:09:05 +0400 |
commit | d7983e3638896e5742fcf1bafe49c49a6b0aa08f (patch) | |
tree | 99470c4aa0896751b9955b5bdb3d3979db73aa91 /source/blender/editors/space_image/space_image.c | |
parent | f0dcff9aa982d32bcb91e594df49a780ac376b5b (diff) |
Option to overlay mask over the footage
Currently supports only two modes:
- Show alpha channel of the mask
- Multiply footage by the mask, which will give
you final-looking combined image.
TODO: Currently rasterization happens on every
redraw, need to cache rasterized mask
somewhere to make redraw more realtime.
Diffstat (limited to 'source/blender/editors/space_image/space_image.c')
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 5a8292abcab..7b20af340ae 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -674,7 +674,6 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) } else if (sima->mode == SI_MODE_MASK) { mask = ED_space_image_get_mask(sima); - draw_image_cursor(ar, sima->cursor); } ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_VIEW); @@ -715,7 +714,9 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) BLI_unlock_thread(LOCK_DRAW_IMAGE); ED_mask_draw_region(mask, ar, - sima->mask_info.draw_flag, sima->mask_info.draw_type, + sima->mask_info.draw_flag, + sima->mask_info.draw_type, + sima->mask_info.overlay_mode, width, height, aspx, aspy, TRUE, FALSE, @@ -723,7 +724,9 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) ED_mask_draw_frames(mask, ar, CFRA, mask->sfra, mask->efra); + UI_view2d_view_ortho(v2d); draw_image_cursor(ar, sima->cursor); + UI_view2d_view_restore(C); } /* scrollers? */ |