diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-03-18 20:34:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-03-18 20:34:00 +0300 |
commit | 201a234c44baa86f90d3959241dcc3faf8ed679c (patch) | |
tree | 1d329a15fe5529bc05794058f27b6176d04ca580 /source/blender/src/meshtools.c | |
parent | c8813776c491f2f503e8cb4ab7cc321e487330b5 (diff) |
added a check so baking works in background mode (through a python script)
Diffstat (limited to 'source/blender/src/meshtools.c')
-rw-r--r-- | source/blender/src/meshtools.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/src/meshtools.c b/source/blender/src/meshtools.c index 8ac0a1f2558..f40ecb74948 100644 --- a/source/blender/src/meshtools.c +++ b/source/blender/src/meshtools.c @@ -1097,15 +1097,17 @@ void objects_bake_render(short event, char **error_msg) if(bkr.ready) break; - g_break= blender_test_break(); - - timer++; - if(area && timer==20) { - Image *ima= RE_bake_shade_get_image(); - if(ima) ((SpaceImage *)area->spacedata.first)->image= ima; - scrarea_do_windraw(area); - myswapbuffers(); - timer= 0; + if (!G.background) { + g_break= blender_test_break(); + + timer++; + if(area && timer==20) { + Image *ima= RE_bake_shade_get_image(); + if(ima) ((SpaceImage *)area->spacedata.first)->image= ima; + scrarea_do_windraw(area); + myswapbuffers(); + timer= 0; + } } } BLI_end_threads(&threads); |