[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49682] trunk/blender/source/blender/ editors/space_file: skip loading file selector icons when running in background mode.
Campbell Barton
ideasman42 at gmail.com
Wed Aug 8 10:25:21 CEST 2012
Revision: 49682
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49682
Author: campbellbarton
Date: 2012-08-08 08:25:20 +0000 (Wed, 08 Aug 2012)
Log Message:
-----------
skip loading file selector icons when running in background mode.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_file/filelist.c
trunk/blender/source/blender/editors/space_file/space_file.c
Modified: trunk/blender/source/blender/editors/space_file/filelist.c
===================================================================
--- trunk/blender/source/blender/editors/space_file/filelist.c 2012-08-08 08:21:58 UTC (rev 49681)
+++ trunk/blender/source/blender/editors/space_file/filelist.c 2012-08-08 08:25:20 UTC (rev 49682)
@@ -383,6 +383,9 @@
short x, y, k;
ImBuf *bbuf;
ImBuf *ibuf;
+
+ BLI_assert(G.background == FALSE);
+
#ifdef WITH_HEADLESS
bbuf = NULL;
#else
@@ -408,6 +411,9 @@
void filelist_free_icons(void)
{
int i;
+
+ BLI_assert(G.background == FALSE);
+
for (i = 0; i < SPECIAL_IMG_MAX; ++i) {
IMB_freeImBuf(gSpecialFileImages[i]);
gSpecialFileImages[i] = NULL;
@@ -615,7 +621,10 @@
ImBuf *filelist_getimage(struct FileList *filelist, int index)
{
ImBuf *ibuf = NULL;
- int fidx = 0;
+ int fidx = 0;
+
+ BLI_assert(G.background == FALSE);
+
if ( (index < 0) || (index >= filelist->numfiltered) ) {
return NULL;
}
@@ -629,7 +638,10 @@
{
ImBuf *ibuf = NULL;
struct direntry *file = NULL;
- int fidx = 0;
+ int fidx = 0;
+
+ BLI_assert(G.background == FALSE);
+
if ( (index < 0) || (index >= filelist->numfiltered) ) {
return NULL;
}
Modified: trunk/blender/source/blender/editors/space_file/space_file.c
===================================================================
--- trunk/blender/source/blender/editors/space_file/space_file.c 2012-08-08 08:21:58 UTC (rev 49681)
+++ trunk/blender/source/blender/editors/space_file/space_file.c 2012-08-08 08:25:20 UTC (rev 49682)
@@ -48,6 +48,7 @@
#include "BKE_context.h"
#include "BKE_screen.h"
+#include "BKE_global.h"
#include "ED_space_api.h"
#include "ED_screen.h"
@@ -624,12 +625,18 @@
fsmenu_read_bookmarks(fsmenu_get(), name);
}
- filelist_init_icons();
+ if (G.background == FALSE) {
+ filelist_init_icons();
+ }
+
IMB_thumb_makedirs();
}
void ED_file_exit(void)
{
fsmenu_free(fsmenu_get());
- filelist_free_icons();
+
+ if (G.background == FALSE) {
+ filelist_free_icons();
+ }
}
More information about the Bf-blender-cvs
mailing list