From 785de4cbfc424fb095ed549f6d9e733014224a51 Mon Sep 17 00:00:00 2001 From: Andrea Weikert Date: Tue, 1 Nov 2011 18:27:09 +0000 Subject: == 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 --- source/blender/blenloader/BLO_readfile.h | 1 - source/blender/blenloader/intern/readfile.c | 64 ++-------------------------- source/blender/blenloader/intern/writefile.c | 4 -- source/blender/editors/interface/resources.c | 16 ------- source/blender/makesdna/DNA_space_types.h | 64 +--------------------------- source/blender/makesdna/DNA_userdef_types.h | 1 - source/blender/makesrna/intern/rna_space.c | 3 -- source/blender/python/simple_enum_gen.py | 2 +- 8 files changed, 5 insertions(+), 150 deletions(-) (limited to 'source/blender') 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); } diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index d3a5c6691ef..4318feca737 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -129,9 +129,6 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo case SPACE_IMAGE: ts= &btheme->tima; break; - case SPACE_IMASEL: - ts= &btheme->timasel; - break; case SPACE_TEXT: ts= &btheme->text; break; @@ -533,7 +530,6 @@ static void ui_theme_init_new(bTheme *btheme) ui_theme_init_new_do(&btheme->tnla); ui_theme_init_new_do(&btheme->tseq); ui_theme_init_new_do(&btheme->tima); - ui_theme_init_new_do(&btheme->timasel); ui_theme_init_new_do(&btheme->text); ui_theme_init_new_do(&btheme->toops); ui_theme_init_new_do(&btheme->ttime); @@ -731,18 +727,6 @@ void ui_theme_init_default(void) SETCOL(btheme->tima.editmesh_active, 255, 255, 255, 128); SETCOLF(btheme->tima.preview_back, 0.45, 0.45, 0.45, 1.0); - /* space imageselect */ - btheme->timasel= btheme->tv3d; - SETCOL(btheme->timasel.active, 195, 195, 195, 255); /* active tile */ - SETCOL(btheme->timasel.grid, 94, 94, 94, 255); /* active file text */ - SETCOL(btheme->timasel.back, 110, 110, 110, 255); - SETCOL(btheme->timasel.shade1, 94, 94, 94, 255); /* bar */ - SETCOL(btheme->timasel.shade2, 172, 172, 172, 255); /* sliders */ - SETCOL(btheme->timasel.hilite, 17, 27, 60, 100); /* selected tile */ - SETCOL(btheme->timasel.text, 0, 0, 0, 255); - SETCOL(btheme->timasel.text_hi, 255, 255, 255, 255); - SETCOL(btheme->timasel.panel, 132, 132, 132, 255); - /* space text */ btheme->text= btheme->tv3d; SETCOL(btheme->text.back, 153, 153, 153, 255); diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 3b5ecbe59d8..d21db85b1f3 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -432,68 +432,6 @@ typedef struct SpaceLogic { struct bGPdata *gpd; /* grease-pencil data */ } SpaceLogic; -/* note, this entire struct isnt used anymore!, - * may remove some day - campbell */ -typedef struct SpaceImaSel { - SpaceLink *next, *prev; - ListBase regionbase; /* storage of regions for inactive spaces */ - int spacetype; - float blockscale; - - short blockhandler[8]; - - View2D v2d; /* deprecated, copied to region */ - - struct FileList *files; - - /* specific stuff for drawing */ - char title[24]; - char dir[240]; - char file[80]; - - short type, menu, flag, sort; - - void *curfont; - int active_file; - - int numtilesx; - int numtilesy; - - int selstate; - - struct rcti viewrect; - struct rcti bookmarkrect; - - float scrollpos; /* current position of scrollhandle */ - float scrollheight; /* height of the scrollhandle */ - float scrollarea; /* scroll region, scrollpos is from 0 to scrollarea */ - - float aspect; - unsigned short retval; /* event */ - - short ipotype; - - short filter; - short active_bookmark; - short pad, pad1; - - /* view settings */ - short prv_w; - short prv_h; - - /* one day we'll add unions to dna */ - void (*returnfunc)(char *); - void (*returnfunc_event)(unsigned short); - void (*returnfunc_args)(char *, void *, void *); - - void *arg1, *arg2; - short *menup; /* pointer to menu result or ID browsing */ - char *pupmenu; /* optional menu in header */ - - struct ImBuf *img; -} SpaceImaSel; - - typedef struct ConsoleLine { struct ConsoleLine *next, *prev; @@ -947,7 +885,7 @@ enum { SPACE_INFO, SPACE_SEQ, SPACE_TEXT, - SPACE_IMASEL, + SPACE_IMASEL, /* deprecated */ SPACE_SOUND, SPACE_ACTION, SPACE_NLA, diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index a3934618582..4859268d477 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -273,7 +273,6 @@ typedef struct bTheme { ThemeSpace tnla; ThemeSpace tseq; ThemeSpace tima; - ThemeSpace timasel; ThemeSpace text; ThemeSpace toops; ThemeSpace ttime; diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 29a2723182b..58ed9c50df5 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -60,7 +60,6 @@ EnumPropertyItem space_type_items[] = { {SPACE_INFO, "INFO", 0, "Info", ""}, {SPACE_SEQ, "SEQUENCE_EDITOR", 0, "Sequence Editor", ""}, {SPACE_TEXT, "TEXT_EDITOR", 0, "Text Editor", ""}, - //{SPACE_IMASEL, "IMAGE_BROWSER", 0, "Image Browser", ""}, {SPACE_SOUND, "AUDIO_WINDOW", 0, "Audio Window", ""}, {SPACE_ACTION, "DOPESHEET_EDITOR", 0, "DopeSheet Editor", ""}, {SPACE_NLA, "NLA_EDITOR", 0, "NLA Editor", ""}, @@ -152,8 +151,6 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr) return &RNA_SpaceSequenceEditor; case SPACE_TEXT: return &RNA_SpaceTextEditor; - //case SPACE_IMASEL: - // return &RNA_SpaceImageBrowser; /*case SPACE_SOUND: return &RNA_SpaceAudioWindow;*/ case SPACE_ACTION: diff --git a/source/blender/python/simple_enum_gen.py b/source/blender/python/simple_enum_gen.py index bc7a2df9fb6..1455747cdbb 100644 --- a/source/blender/python/simple_enum_gen.py +++ b/source/blender/python/simple_enum_gen.py @@ -29,7 +29,7 @@ defs = """ SPACE_INFO, SPACE_SEQ, SPACE_TEXT, - SPACE_IMASEL, + SPACE_IMASEL, #Deprecated SPACE_SOUND, SPACE_ACTION, SPACE_NLA, -- cgit v1.2.3