diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-02 03:24:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-02 03:24:51 +0400 |
commit | 9be43762bc70276b1d4f9e722f1498e70c1426c0 (patch) | |
tree | 53f5f6fc07d8d9f9b4a5313d09e6c8f728e9db12 /source/blender/blenloader | |
parent | 85e0609c54f52068ac53435e80dda6d04b1a1373 (diff) | |
parent | 90a19ce57893642263a0b91eed96ba1a710d44af (diff) |
svn merge -r41431:41453 ^/trunk/blender
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/BLO_readfile.h | 1 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 91 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 7 |
3 files changed, 9 insertions, 90 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index 1777979c3ab..38925ea5238 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -44,7 +44,6 @@ struct MemFile; struct ReportList; struct Scene; struct SpaceFile; -struct SpaceImaSel; struct UserDef; struct bContext; struct BHead; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index bc7c6f00f49..c1b92094433 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4993,15 +4993,6 @@ static void lib_link_screen(FileData *fd, Main *main) sfile->folders_prev= NULL; sfile->folders_next= NULL; } - else if(sl->spacetype==SPACE_IMASEL) { - SpaceImaSel *simasel= (SpaceImaSel *)sl; - - simasel->files = NULL; - simasel->returnfunc= NULL; - simasel->menup= NULL; - simasel->pupmenu= NULL; - simasel->img= NULL; - } else if(sl->spacetype==SPACE_ACTION) { SpaceAction *saction= (SpaceAction *)sl; bDopeSheet *ads= &saction->ads; @@ -5065,11 +5056,6 @@ static void lib_link_screen(FileData *fd, Main *main) } } } - else if(sl->spacetype==SPACE_SOUND) { - SpaceSound *ssound= (SpaceSound *)sl; - - ssound->sound= newlibadr_us(fd, sc->id.lib, ssound->sound); - } else if(sl->spacetype==SPACE_NODE) { SpaceNode *snode= (SpaceNode *)sl; @@ -5226,12 +5212,6 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) SpaceFile *sfile= (SpaceFile *)sl; sfile->op= NULL; } - else if(sl->spacetype==SPACE_IMASEL) { - SpaceImaSel *simasel= (SpaceImaSel *)sl; - if (simasel->files) { - //XXX BIF_filelist_freelib(simasel->files); - } - } else if(sl->spacetype==SPACE_ACTION) { SpaceAction *saction= (SpaceAction *)sl; @@ -5298,11 +5278,6 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) } } } - else if(sl->spacetype==SPACE_SOUND) { - SpaceSound *ssound= (SpaceSound *)sl; - - ssound->sound= restore_pointer_by_name(newmain, (ID *)ssound->sound, 1); - } else if(sl->spacetype==SPACE_NODE) { SpaceNode *snode= (SpaceNode *)sl; @@ -6690,16 +6665,6 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb) //ar->v2d.flag |= V2D_IS_INITIALISED; break; } - case SPACE_SOUND: - { - SpaceSound *ssound= (SpaceSound *)sl; - memcpy(&ar->v2d, &ssound->v2d, sizeof(View2D)); - - ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL); - ar->v2d.scroll |= (V2D_SCROLL_LEFT); - //ar->v2d.flag |= V2D_IS_INITIALISED; - break; - } case SPACE_NLA: { SpaceNla *snla= (SpaceNla *)sl; @@ -6815,11 +6780,17 @@ static void do_versions_windowmanager_2_50(bScreen *screen) area_add_window_regions(sa, sa->spacedata.first, &sa->regionbase); - /* space imageselect is depricated */ + /* space imageselect is deprecated */ for(sl= sa->spacedata.first; sl; sl= sl->next) { if(sl->spacetype==SPACE_IMASEL) - sl->spacetype= SPACE_INFO; /* spacedata then matches */ - } + sl->spacetype= SPACE_EMPTY; /* spacedata then matches */ + } + + /* space sound is deprecated */ + for(sl= sa->spacedata.first; sl; sl= sl->next) { + if(sl->spacetype==SPACE_SOUND) + sl->spacetype= SPACE_EMPTY; /* spacedata then matches */ + } /* it seems to be possible in 2.5 to have this saved, filewindow probably */ sa->butspacetype= sa->spacetype; @@ -9219,7 +9190,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } if(main->versionfile <= 245) { Scene *sce; - bScreen *sc; Object *ob; Image *ima; Lamp *la; @@ -9309,49 +9279,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main) for(ima= main->image.first; ima; ima= ima->id.next) { ima->preview = NULL; } - - /* repair imasel space - completely reworked */ - for(sc= main->screen.first; sc; sc= sc->id.next) { - ScrArea *sa; - sa= sc->areabase.first; - while(sa) { - SpaceLink *sl; - - for (sl= sa->spacedata.first; sl; sl= sl->next) { - if(sl->spacetype==SPACE_IMASEL) { - SpaceImaSel *simasel= (SpaceImaSel*) sl; - simasel->blockscale= 0.7f; - /* view 2D */ - simasel->v2d.tot.xmin= -10.0f; - simasel->v2d.tot.ymin= -10.0f; - simasel->v2d.tot.xmax= (float)sa->winx + 10.0f; - simasel->v2d.tot.ymax= (float)sa->winy + 10.0f; - simasel->v2d.cur.xmin= 0.0f; - simasel->v2d.cur.ymin= 0.0f; - simasel->v2d.cur.xmax= (float)sa->winx; - simasel->v2d.cur.ymax= (float)sa->winy; - simasel->v2d.min[0]= 1.0; - simasel->v2d.min[1]= 1.0; - simasel->v2d.max[0]= 32000.0f; - simasel->v2d.max[1]= 32000.0f; - simasel->v2d.minzoom= 0.5f; - simasel->v2d.maxzoom= 1.21f; - simasel->v2d.scroll= 0; - simasel->v2d.keepzoom= V2D_LIMITZOOM|V2D_KEEPASPECT; - simasel->v2d.keeptot= 0; - simasel->prv_h = 96; - simasel->prv_w = 96; - simasel->flag = 7; /* ??? elubie */ - BLI_strncpy (simasel->dir, U.textudir, sizeof(simasel->dir)); /* TON */ - simasel->file[0]= '\0'; - - simasel->returnfunc = NULL; - simasel->title[0] = 0; - } - } - sa = sa->next; - } - } } /* add point caches */ diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 4ef2356eed6..dad246516a9 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2208,10 +2208,6 @@ static void write_screens(WriteData *wd, ListBase *scrbase) if(sima->cumap) write_curvemapping(wd, sima->cumap); } - else if(sl->spacetype==SPACE_IMASEL) { - // XXX: depreceated... do we still want to keep this? - writestruct(wd, DATA, "SpaceImaSel", 1, sl); - } else if(sl->spacetype==SPACE_TEXT) { writestruct(wd, DATA, "SpaceText", 1, sl); } @@ -2223,9 +2219,6 @@ static void write_screens(WriteData *wd, ListBase *scrbase) else if(sl->spacetype==SPACE_ACTION) { writestruct(wd, DATA, "SpaceAction", 1, sl); } - else if(sl->spacetype==SPACE_SOUND) { - writestruct(wd, DATA, "SpaceSound", 1, sl); - } else if(sl->spacetype==SPACE_NLA){ SpaceNla *snla= (SpaceNla *)sl; |