diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-02-01 12:24:18 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-02-01 12:24:18 +0400 |
commit | 2a71e4e4f0c703a613b74fb1d0710b341987e6e3 (patch) | |
tree | 2191c686b7dd3adedf4becb4f45f5d2d3423daf3 | |
parent | 7dc33e3ef8429d7d541e8c0291826a2d42c56566 (diff) |
make WITH_HEADLESS build again.
-rw-r--r-- | intern/ghost/intern/GHOST_SystemNULL.h | 13 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 8 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 3 | ||||
-rw-r--r-- | source/creator/creator.c | 7 |
4 files changed, 21 insertions, 10 deletions
diff --git a/intern/ghost/intern/GHOST_SystemNULL.h b/intern/ghost/intern/GHOST_SystemNULL.h index cf43aa7549d..7021dea36dd 100644 --- a/intern/ghost/intern/GHOST_SystemNULL.h +++ b/intern/ghost/intern/GHOST_SystemNULL.h @@ -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(); diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 619fb18cd7a..1a3d8d20d47 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -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); diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 4de92d090fc..7359979c992 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -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; diff --git a/source/creator/creator.c b/source/creator/creator.c index b0022ffa118..7916d34bf13 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -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 */ |