diff options
author | Joshua Leung <aligorith@gmail.com> | 2012-06-11 04:21:50 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2012-06-11 04:21:50 +0400 |
commit | 0df68aacb10a7f947673d925e09a539ee8c4bb9c (patch) | |
tree | c19679d63689445aa770bdfc2b421a71229235e2 /source/blender/editors/space_sequencer/sequencer_draw.c | |
parent | f305261f14254656c888438205887769ad45b8bd (diff) |
Grease Pencil - Support for Grease Pencil in the Sequence Editor preview/image
space works again
This commit restores the support for using Grease Pencil in the Sequence Editor
image preview region, making it possible to scribble on footage for review
purposes again. Due to internal changes in how the Sequencer handles the image
drawing for this stuff (i.e. it is now fully based on View2D instead of trying
to implement its own little crazy offset+zoom stuff), a lot of the old code for
handling those offsets is no longer needed. Instead, one of the "standard" cases
is now used, and works quite well.
Bugfixes:
* View-space Grease Pencil drawing was done in wrong place (before view2d
restore)
* Grease Pencil entry in RNA had wrong/missing type
Credits:
* DingTo - initial patch/attempt at restoring support
* Aligorith - solved the "offset problems"
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_draw.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index b674943b2dc..3119c2d44f8 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -58,6 +58,7 @@ #include "BIF_glutil.h" #include "ED_anim_api.h" +#include "ED_gpencil.h" #include "ED_markers.h" #include "ED_mask.h" #include "ED_types.h" @@ -976,16 +977,16 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq /* draw grease-pencil (image aligned) */ // if (sseq->flag & SEQ_DRAW_GPENCIL) -// XXX draw_gpencil_2dimage(sa, ibuf); + draw_gpencil_2dimage(C); IMB_freeImBuf(ibuf); - /* draw grease-pencil (screen aligned) */ -// if (sseq->flag & SEQ_DRAW_GPENCIL) -// XXX draw_gpencil_view2d(sa, 0); - /* ortho at pixel level */ UI_view2d_view_restore(C); + + /* draw grease-pencil (screen aligned) */ +// if (sseq->flag & SEQ_DRAW_GPENCIL) + draw_gpencil_view2d(C, 0); //if (sc->mode == SC_MODE_MASKEDIT) { if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) { |