diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 63524c47592..5f21beaccea 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -70,6 +70,7 @@ #include "DNA_group_types.h" #include "DNA_armature_types.h" #include "DNA_action_types.h" +#include "DNA_userdef_types.h" #include "BLI_blenlib.h" #include "BLI_dynstr.h" @@ -559,6 +560,9 @@ static void IDnames_to_dyn_pupstring(DynStr *pupds, ListBase *lb, ID *link, shor char buf[32]; if (nr && id==link) *nr= i+1; + + if (U.uiflag & USER_HIDE_DOT && id->name[2]=='.') + continue; get_flags_for_id(id, buf); @@ -601,6 +605,9 @@ static void IPOnames_to_dyn_pupstring(DynStr *pupds, ListBase *lb, ID *link, sho if (id==link) *nr= i+1; + if (U.uiflag & USER_HIDE_DOT && id->name[2]=='.') + continue; + get_flags_for_id(id, buf); BLI_dynstr_append(pupds, buf); diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index beb9abafadd..f86d087cc11 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -202,6 +202,7 @@ extern UserDef U; /* from usiblender.c !!!! */ #define USER_LOCKAROUND 4096 #define USER_GLOBALUNDO 8192 #define USER_ORBIT_SELECTION 16384 +#define USER_HIDE_DOT 65536 /* transopts */ diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c index b2a2360b9e5..c122bf91073 100644 --- a/source/blender/src/filesel.c +++ b/source/blender/src/filesel.c @@ -1097,7 +1097,6 @@ static void draw_filetext(SpaceFile *sfile) for(a= sfile->ofs; atotfile; a++, files++) { if( calc_filesel_line(sfile, a, &x, &y)==0 ) break; - print_line(sfile, files, x, y); } @@ -1275,6 +1274,9 @@ void activate_fileselect(int type, char *title, char *file, void (*func)(char *) if(BLI_convertstringcode(name, G.sce, G.scene->r.cfra)) sfile->flag |= FILE_STRINGCODE; else sfile->flag &= ~FILE_STRINGCODE; + if (U.uiflag & USER_HIDE_DOT) + sfile->flag |= FILE_HIDE_DOT; + if(type==FILE_MAIN) { char *groupname; @@ -2372,6 +2374,10 @@ void main_to_filelist(SpaceFile *sfile) struct direntry *files, *firstlib = NULL; ListBase *lb; int a, fake, idcode, len, ok, totlib, totbl; + short hide = 0; + + if (sfile->flag & FILE_HIDE_DOT) + hide = 1; if(sfile->dir[0]=='/') sfile->dir[0]= 0; @@ -2425,12 +2431,12 @@ void main_to_filelist(SpaceFile *sfile) id= lb->first; sfile->totfile= 0; while(id) { - if(sfile->returnfunc && idcode==ID_IP) { if(sfile->ipotype== ((Ipo *)id)->blocktype) sfile->totfile++; } - else sfile->totfile++; - + else if (hide==0 || id->name[2] != '.') + sfile->totfile++; + id= id->next; } @@ -2463,33 +2469,35 @@ void main_to_filelist(SpaceFile *sfile) if(ok) { - memset( files, 0 , sizeof(struct direntry)); - files->relname= BLI_strdup(id->name+2); - - if(sfile->returnfunc==0) { /* F4 DATA BROWSE */ - if(idcode==ID_OB) { - if( ((Object *)id)->flag & SELECT) files->flags |= ACTIVE; + if (hide==0 || id->name[2] != '.') { + memset( files, 0 , sizeof(struct direntry)); + files->relname= BLI_strdup(id->name+2); + + if(sfile->returnfunc==0) { /* F4 DATA BROWSE */ + if(idcode==ID_OB) { + if( ((Object *)id)->flag & SELECT) files->flags |= ACTIVE; + } + else if(idcode==ID_SCE) { + if( ((Scene *)id)->r.scemode & R_BG_RENDER) files->flags |= ACTIVE; + } } - else if(idcode==ID_SCE) { - if( ((Scene *)id)->r.scemode & R_BG_RENDER) files->flags |= ACTIVE; + files->nr= totbl+1; + files->poin= id; + fake= id->flag & LIB_FAKEUSER; + + if(id->lib && fake) sprintf(files->extra, "LF %d", id->us); + else if(id->lib) sprintf(files->extra, "L %d", id->us); + else if(fake) sprintf(files->extra, "F %d", id->us); + else sprintf(files->extra, " %d", id->us); + + if(id->lib) { + if(totlib==0) firstlib= files; + totlib++; } + + files++; + totbl++; } - files->nr= totbl+1; - files->poin= id; - fake= id->flag & LIB_FAKEUSER; - - if(id->lib && fake) sprintf(files->extra, "LF %d", id->us); - else if(id->lib) sprintf(files->extra, "L %d", id->us); - else if(fake) sprintf(files->extra, "F %d", id->us); - else sprintf(files->extra, " %d", id->us); - - if(id->lib) { - if(totlib==0) firstlib= files; - totlib++; - } - - files++; - totbl++; } id= id->next; diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 906f4c61eee..dee2d7c0e92 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -1087,7 +1087,7 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt) else if(val==3) v3d->twmode= V3D_MANIP_NORMAL; v3d->twflag |= V3D_USE_MANIPULATOR; doredraw= 1; - } + } } break; @@ -2850,17 +2850,21 @@ void drawinfospace(ScrArea *sa, void *spacedata) uiDefBut(block, LABEL,0,"System:", - (xpos+edgsp+(4*midsp)+(4*mpref)),y3label,mpref,buth, + (xpos+edgsp+(4*midsp)+(4*mpref)),y4label,mpref,buth, 0, 0, 0, 0, 0, ""); uiDefButBitI(block, TOG, USER_DISABLE_SOUND, B_SOUNDTOGGLE, "Disable Game Sound", - (xpos+edgsp+(4*mpref)+(4*midsp)),y2,mpref,buth, + (xpos+edgsp+(4*mpref)+(4*midsp)),y3,mpref,buth, &(U.gameflags), 0, 0, 0, 0, "Disables sounds from being played in games"); uiDefButBitI(block, TOG, USER_FILTERFILEEXTS, 0, "Filter File Extensions", - (xpos+edgsp+(4*mpref)+(4*midsp)),y1,mpref,buth, + (xpos+edgsp+(4*mpref)+(4*midsp)),y2,mpref,buth, &(U.uiflag), 0, 0, 0, 0, "Display only files with extensions in the image select window"); + uiDefButBitI(block, TOG, USER_HIDE_DOT, 0, "Hide dot file/datablock", + (xpos+edgsp+(4*mpref)+(4*midsp)),y1,mpref,buth, + &(U.uiflag), 0, 0, 0, 0, "Hide files/datablocks that start with a dot(.*)"); + uiDefBut(block, LABEL,0,"OpenGL:", (xpos+edgsp+(5*midsp)+(5*mpref)),y5label,mpref,buth,