[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54248] trunk/blender: make WITH_HEADLESS build again.

Campbell Barton ideasman42 at gmail.com
Fri Feb 1 09:24:22 CET 2013


Revision: 54248
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54248
Author:   campbellbarton
Date:     2013-02-01 08:24:18 +0000 (Fri, 01 Feb 2013)
Log Message:
-----------
make WITH_HEADLESS build again.

Modified Paths:
--------------
    trunk/blender/intern/ghost/intern/GHOST_SystemNULL.h
    trunk/blender/source/blender/editors/interface/interface_icons.c
    trunk/blender/source/blender/python/intern/bpy_rna.c
    trunk/blender/source/creator/creator.c

Modified: trunk/blender/intern/ghost/intern/GHOST_SystemNULL.h
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemNULL.h	2013-02-01 06:24:49 UTC (rev 54247)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemNULL.h	2013-02-01 08:24:18 UTC (rev 54248)
@@ -38,7 +38,7 @@
 class GHOST_SystemNULL : public GHOST_System {
 public:
 
-	GHOST_SystemNULL( ) : GHOST_System() { /* nop */ }
+	GHOST_SystemNULL() : GHOST_System() { /* nop */ }
 	~GHOST_SystemNULL() { /* nop */ }
 	bool processEvents(bool waitForEvent) { return false; }
 	int toggleConsole(int action) { return 0; }
@@ -46,11 +46,12 @@
 	GHOST_TSuccess getButtons(GHOST_Buttons& buttons) const { return GHOST_kSuccess; }
 	GHOST_TUns8 *getClipboard(bool selection) const { return NULL; }
 	void putClipboard(GHOST_TInt8 *buffer, bool selection) const { /* nop */ }
-	GHOST_TUns64 getMilliSeconds( ) const { return 0; }
-	GHOST_TUns8 getNumDisplays( ) const { return GHOST_TUns8(1); }
-	GHOST_TSuccess getCursorPosition( GHOST_TInt32& x, GHOST_TInt32& y ) const { return GHOST_kFailure; }
-	GHOST_TSuccess setCursorPosition( GHOST_TInt32 x, GHOST_TInt32 y ) { return GHOST_kFailure; }
-	void getMainDisplayDimensions( GHOST_TUns32& width, GHOST_TUns32& height ) const { /* nop */ }
+	GHOST_TUns64 getMilliSeconds() const { return 0; }
+	GHOST_TUns8 getNumDisplays() const { return GHOST_TUns8(1); }
+	GHOST_TSuccess getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const { return GHOST_kFailure; }
+	GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) { return GHOST_kFailure; }
+	void getMainDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const { /* nop */ }
+	void getAllDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const { /* nop */ }
 
 	GHOST_TSuccess init() {
 		GHOST_TSuccess success = GHOST_System::init();

Modified: trunk/blender/source/blender/editors/interface/interface_icons.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_icons.c	2013-02-01 06:24:49 UTC (rev 54247)
+++ trunk/blender/source/blender/editors/interface/interface_icons.c	2013-02-01 08:24:18 UTC (rev 54248)
@@ -130,6 +130,7 @@
 
 /* **************************************************** */
 
+#ifndef WITH_HEADLESS
 
 static DrawInfo *def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, int size, int type)
 {
@@ -469,6 +470,7 @@
 }
 
 #ifndef WITH_HEADLESS
+
 static void init_brush_icons(void)
 {
 
@@ -781,6 +783,8 @@
 	}
 }
 
+#endif  /* WITH_HEADLESS */
+
 int UI_iconfile_get_index(const char *filename)
 {
 	IconFile *ifile;
@@ -1134,9 +1138,9 @@
 	else if (di->type == ICON_TYPE_BUFFER) {
 		/* it is a builtin icon */
 		iimg = di->data.buffer.image;
-
+#ifndef WITH_HEADLESS
 		icon_verify_datatoc(iimg);
-			
+#endif
 		if (!iimg->rect) return;  /* something has gone wrong! */
 
 		glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);

Modified: trunk/blender/source/blender/python/intern/bpy_rna.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_rna.c	2013-02-01 06:24:49 UTC (rev 54247)
+++ trunk/blender/source/blender/python/intern/bpy_rna.c	2013-02-01 08:24:18 UTC (rev 54248)
@@ -6542,6 +6542,9 @@
 
 static PyTypeObject pyrna_basetype_Type = BLANK_PYTHON_TYPE;
 
+/**
+ * Accessed from Python as 'bpy.types'
+ */
 PyObject *BPY_rna_types(void)
 {
 	BPy_BaseTypeRNA *self;

Modified: trunk/blender/source/creator/creator.c
===================================================================
--- trunk/blender/source/creator/creator.c	2013-02-01 06:24:49 UTC (rev 54247)
+++ trunk/blender/source/creator/creator.c	2013-02-01 08:24:18 UTC (rev 54248)
@@ -1485,10 +1485,13 @@
 
 
 #if defined(WITH_PYTHON_MODULE) || defined(WITH_HEADLESS)
-	G.background = 1; /* python module mode ALWAYS runs in background mode (for now) */
+	G.background = true; /* python module mode ALWAYS runs in background mode (for now) */
+	(void)blender_esc;
 #else
 	/* for all platforms, even windos has it! */
-	if (G.background) signal(SIGINT, blender_esc);  /* ctrl c out bg render */
+	if (G.background) {
+		signal(SIGINT, blender_esc);  /* ctrl c out bg render */
+	}
 #endif
 
 	/* background render uses this font too */




More information about the Bf-blender-cvs mailing list