diff options
author | Andrea Weikert <elubie@gmx.net> | 2011-11-01 22:27:09 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2011-11-01 22:27:09 +0400 |
commit | 785de4cbfc424fb095ed549f6d9e733014224a51 (patch) | |
tree | 10de74481fd2d30a68c92f00a431a3dbc7277686 /source/blender/blenloader | |
parent | c70cde6f94884f67cc9d4fb0546a50d2a7f96f65 (diff) |
== Cleanup of SpaceImasel ==
* removed struct for SpaceType and all usages
* SPACE_IMASEL in enum nees to be kept to identify it in old files
* it is replaces with SPACE_EMPTY on load, which is overridden by SPACE_INFO which has same struct members
* also removed theme settings
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 | 64 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 4 |
3 files changed, 3 insertions, 66 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 16da7321524..bb068ac80eb 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4927,15 +4927,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; @@ -5160,12 +5151,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; @@ -6749,11 +6734,11 @@ 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 */ + } /* it seems to be possible in 2.5 to have this saved, filewindow probably */ sa->butspacetype= sa->spacetype; @@ -9243,49 +9228,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 f0f5ab283a6..18807f911ed 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2205,10 +2205,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); } |