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:
authorJoshua Leung <aligorith@gmail.com>2012-06-11 04:21:50 +0400
committerJoshua Leung <aligorith@gmail.com>2012-06-11 04:21:50 +0400
commit0df68aacb10a7f947673d925e09a539ee8c4bb9c (patch)
treec19679d63689445aa770bdfc2b421a71229235e2 /source/blender/editors/space_sequencer/space_sequencer.c
parentf305261f14254656c888438205887769ad45b8bd (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/space_sequencer.c')
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 3643f92d334..dbfc554007a 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -485,6 +485,11 @@ static void sequencer_preview_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
switch (wmn->category) {
+ case NC_SCREEN:
+ if (wmn->data == ND_GPENCIL) {
+ ED_region_tag_redraw(ar);
+ }
+ break;
case NC_SCENE:
switch (wmn->data) {
case ND_FRAME:
@@ -534,6 +539,11 @@ static void sequencer_buttons_area_listener(ARegion *ar, wmNotifier *wmn)
{
/* context changes */
switch (wmn->category) {
+ case NC_SCREEN:
+ if (wmn->data == ND_GPENCIL) {
+ ED_region_tag_redraw(ar);
+ }
+ break;
case NC_SCENE:
switch (wmn->data) {
case ND_FRAME:
@@ -590,7 +600,7 @@ void ED_spacetype_sequencer(void)
art->init = sequencer_preview_area_init;
art->draw = sequencer_preview_area_draw;
art->listener = sequencer_preview_area_listener;
- art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_ANIMATION;
+ art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_GPENCIL;
BLI_addhead(&st->regiontypes, art);
/* regions: listview/buttons */
@@ -602,6 +612,8 @@ void ED_spacetype_sequencer(void)
art->init = sequencer_buttons_area_init;
art->draw = sequencer_buttons_area_draw;
BLI_addhead(&st->regiontypes, art);
+
+ sequencer_buttons_register(art);
/* regions: header */
art = MEM_callocN(sizeof(ARegionType), "spacetype sequencer region");