forked from bartvdbraak/blender
== 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
This commit is contained in:
parent
c70cde6f94
commit
785de4cbfc
@ -44,7 +44,6 @@ struct MemFile;
|
||||
struct ReportList;
|
||||
struct Scene;
|
||||
struct SpaceFile;
|
||||
struct SpaceImaSel;
|
||||
struct UserDef;
|
||||
struct bContext;
|
||||
struct BHead;
|
||||
|
@ -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,10 +6734,10 @@ 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 */
|
||||
@ -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 */
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -273,7 +273,6 @@ typedef struct bTheme {
|
||||
ThemeSpace tnla;
|
||||
ThemeSpace tseq;
|
||||
ThemeSpace tima;
|
||||
ThemeSpace timasel;
|
||||
ThemeSpace text;
|
||||
ThemeSpace toops;
|
||||
ThemeSpace ttime;
|
||||
|
@ -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:
|
||||
|
@ -29,7 +29,7 @@ defs = """
|
||||
SPACE_INFO,
|
||||
SPACE_SEQ,
|
||||
SPACE_TEXT,
|
||||
SPACE_IMASEL,
|
||||
SPACE_IMASEL, #Deprecated
|
||||
SPACE_SOUND,
|
||||
SPACE_ACTION,
|
||||
SPACE_NLA,
|
||||
|
Loading…
Reference in New Issue
Block a user