diff options
author | Ton Roosendaal <ton@blender.org> | 2008-12-12 21:47:12 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-12-12 21:47:12 +0300 |
commit | a46ddac1a979b2b94cf3a46c4b6a738841b025dc (patch) | |
tree | 420cc36b4cfc61b6d614f79e267cbcf17e46a6f0 /source/blender/blenloader | |
parent | faf7965b3ca383d5b9504b644dff2ea40a55eb26 (diff) |
2.5
- Added rudimentary support for Ipo window
(Joshua can check on view2d issues for this? :)
- removed ED_area.h, added ED_space_api.h
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index f7638ae1d10..7548c9ca970 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5063,10 +5063,30 @@ static void area_add_header_region(ScrArea *sa, ListBase *lb) /* 2.50 patch */ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) { - ARegion *ar= MEM_callocN(sizeof(ARegion), "area region from do_versions"); + ARegion *ar; + + if(sl) { + /* first channels for ipo action nla... */ + switch(sl->spacetype) { + case SPACE_IPO: + ar= MEM_callocN(sizeof(ARegion), "area region from do_versions"); + BLI_addtail(lb, ar); + ar->regiontype= RGN_TYPE_CHANNELS; + ar->alignment= RGN_ALIGN_RIGHT; + + break; + case SPACE_ACTION: + break; + case SPACE_NLA: + break; + } + } + /* main region */ + ar= MEM_callocN(sizeof(ARegion), "area region from do_versions"); BLI_addtail(lb, ar); ar->winrct= sa->totrct; + ar->regiontype= RGN_TYPE_WINDOW; if(sl) { @@ -5097,19 +5117,19 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) ar->v2d.min[1]= ar->v2d.max[1]= 500.0; } break; + case SPACE_IPO: + { + SpaceIpo *sipo= (SpaceIpo *)sl; + memcpy(&ar->v2d, &sipo->v2d, sizeof(View2D)); + + ar->v2d.scroll= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_BOTTOM); + ar->v2d.scroll |= (V2D_SCROLL_LEFT|V2D_SCROLL_SCALE_LEFT); + + } //case SPACE_XXX: // FIXME... add other ones // memcpy(&ar->v2d, &((SpaceXxx *)sl)->v2d, sizeof(View2D)); // break; } - /* further subdivision case, channels for ipo action nla... */ - switch(sl->spacetype) { - case SPACE_IPO: - break; - case SPACE_ACTION: - break; - case SPACE_NLA: - break; - } } } |