make WITH_HEADLESS build again.

This commit is contained in:
Campbell Barton
2013-02-01 08:24:18 +00:00
parent 7dc33e3ef8
commit 2a71e4e4f0
4 changed files with 21 additions and 10 deletions

View File

@@ -38,7 +38,7 @@ class GHOST_WindowNULL;
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 @@ public:
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();

View File

@@ -130,6 +130,7 @@ static IconTexture icongltex = {0, 0, 0, 0.0f, 0.0f};
/* **************************************************** */
#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 @@ static void vicon_move_down_draw(int x, int y, int w, int h, float UNUSED(alpha)
}
#ifndef WITH_HEADLESS
static void init_brush_icons(void)
{
@@ -781,6 +783,8 @@ static void free_iconfile_list(struct ListBase *list)
}
}
#endif /* WITH_HEADLESS */
int UI_iconfile_get_index(const char *filename)
{
IconFile *ifile;
@@ -1134,9 +1138,9 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al
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);

View File

@@ -6542,6 +6542,9 @@ static PyObject *pyrna_basetype_dir(BPy_BaseTypeRNA *self)
static PyTypeObject pyrna_basetype_Type = BLANK_PYTHON_TYPE;
/**
* Accessed from Python as 'bpy.types'
*/
PyObject *BPY_rna_types(void)
{
BPy_BaseTypeRNA *self;

View File

@@ -1485,10 +1485,13 @@ int main(int argc, const char **argv)
#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 */