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>2009-11-26 15:22:43 +0300
committerJoshua Leung <aligorith@gmail.com>2009-11-26 15:22:43 +0300
commit0eb70a4ca968f2a74389922ae78e09f0afa1118e (patch)
tree85e67310607ee912d1bcc65b3cc426f3fcfd2989 /source/blender/editors/space_sequencer/space_sequencer.c
parent7828f822dfd73f5ef6bc8127961c9a4a10fd9f38 (diff)
Sequencer Drawing Code - Refactoring Part 1:
- Started cleaning up the sequencer drawing code by firstly decoupling the different draw modes from each other (i.e. timeline view doesn't call image view). - Also separated out a few distinct few phases in sequencer-timeline drawing into different functions instead of being lumped in the single one. Recoded part of this to make it less ugly too... - Made markers get drawn again in the sequencer timeline view
Diffstat (limited to 'source/blender/editors/space_sequencer/space_sequencer.c')
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 7e1fdc80bb3..f0fe3b47492 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -194,6 +194,23 @@ static void sequencer_main_area_init(wmWindowManager *wm, ARegion *ar)
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
}
+static void sequencer_main_area_draw(const bContext *C, ARegion *ar)
+{
+ ScrArea *sa= CTX_wm_area(C);
+ SpaceSeq *sseq= sa->spacedata.first;
+ Scene *scene= CTX_data_scene(C);
+
+
+ if (sseq->mainb != SEQ_DRAW_SEQUENCE) {
+ /* image-viewer types */
+ draw_image_seq(scene, ar, sseq);
+ }
+ else {
+ /* NLE - strip editing timeline interface */
+ draw_timeline_seq(C, ar);
+ }
+}
+
/* add handlers, stuff you only do once or on area/region changes */
static void sequencer_header_area_init(wmWindowManager *wm, ARegion *ar)
@@ -281,7 +298,7 @@ void ED_spacetype_sequencer(void)
art= MEM_callocN(sizeof(ARegionType), "spacetype sequencer region");
art->regionid = RGN_TYPE_WINDOW;
art->init= sequencer_main_area_init;
- art->draw= drawseqspace;
+ art->draw= sequencer_main_area_draw;
art->listener= sequencer_main_area_listener;
art->keymapflag= ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_ANIMATION;