diff options
author | Ton Roosendaal <ton@blender.org> | 2008-12-11 22:35:27 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-12-11 22:35:27 +0300 |
commit | 7a1100c8b536a63a72f3a28947f31c9cf94480d5 (patch) | |
tree | b7db0519bf1a9b9b39bdf754cb62a3ef4b4df148 /source/blender/editors/space_time/space_time.c | |
parent | d39b43aa2010c9b5262428b4afedebd1686307ba (diff) |
2.5
Today's progress; half working, but i better commit to prevent
conflicts tomorrow :)
- added storage for regions in spacedata
- added space switching (unfinished, gives mem-free errors)
- bugfix: icon of timewindow gave error on split-area
- cleaned interface_icons.c a bit, no warnings
- first work on space new() callbacks, they have to make regions too
NOTE: probably files saved with 2.5 crash now. Have to look at
patching this.
NOTE2: the Makefiles required libeditor screen twice... scons too?
Diffstat (limited to 'source/blender/editors/space_time/space_time.c')
-rw-r--r-- | source/blender/editors/space_time/space_time.c | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index de7573892aa..3aba13104c6 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -202,19 +202,31 @@ static void time_header_area_free(ARegion *ar) static SpaceLink *time_new(void) { + ARegion *ar; SpaceTime *stime; stime= MEM_callocN(sizeof(SpaceTime), "inittime"); stime->spacetype= SPACE_TIME; - stime->blockscale= 0.7; stime->redraws= TIME_ALL_3D_WIN|TIME_ALL_ANIM_WIN; + stime->flag |= TIME_DRAWFRAMES; - // XXX move to region! - stime->v2d.tot.xmin= -4.0; - stime->v2d.tot.ymin= 0.0; - stime->v2d.tot.xmax= (float)EFRA + 4.0; - //stime->v2d.tot.ymax= (float)stime->winy; + /* header */ + ar= MEM_callocN(sizeof(ARegion), "header for time"); + + BLI_addtail(&stime->regionbase, ar); + ar->regiontype= RGN_TYPE_HEADER; + + /* main area */ + ar= MEM_callocN(sizeof(ARegion), "main area for time"); + + BLI_addtail(&stime->regionbase, ar); + ar->regiontype= RGN_TYPE_WINDOW; + + ar->v2d.tot.xmin= -4.0; + ar->v2d.tot.ymin= 0.0; + ar->v2d.tot.xmax= (float)EFRA + 4.0; + ar->v2d.tot.ymax= 10; stime->v2d.cur= stime->v2d.tot; @@ -227,12 +239,9 @@ static SpaceLink *time_new(void) stime->v2d.minzoom= 0.1f; stime->v2d.maxzoom= 10.0; - stime->v2d.scroll= 0; - stime->v2d.keepaspect= 0; - stime->v2d.keepzoom= 0; - stime->v2d.keeptot= 0; - - stime->flag |= TIME_DRAWFRAMES; + ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_BOTTOM); + ar->v2d.align |= V2D_ALIGN_NO_NEG_Y; + ar->v2d.keepofs |= V2D_LOCKOFS_Y; return (SpaceLink*)stime; } @@ -248,7 +257,7 @@ static void time_free(SpaceLink *sl) /* validate spacedata, add own area level handlers */ static void time_init(wmWindowManager *wm, ScrArea *sa) { - + } static SpaceLink *time_duplicate(SpaceLink *sl) |