*python documention & bug fix

- added documentation to Render - saveRenderedImage has an option to save the zbuffer along with the image
(off by default)
- fixed a really annoying runtime error of uninitialized data being passed to a method in pipeline.c during a render
This commit is contained in:
Joseph Gilbert 2006-05-25 21:10:28 +00:00
parent af87c651a5
commit 1b577b7f0d
3 changed files with 6 additions and 2 deletions

@ -107,11 +107,13 @@ class RenderData:
Render a series of frames to an output directory.
"""
def saveRenderedImage(filename):
def saveRenderedImage(filename, zbuffer=0):
"""
Saves the image rendered using RenderData.render() to the filename and path
given in the variable 'filename'
@param filename: The path+filename for the rendered image.
@type zbuffer: int
@param zbuffer: Whether or not to render the zbuffer along with the image.
@type filename: string
@since: 2.40
@requires: You must have an image currently rendered before calling this method

@ -918,6 +918,8 @@ PyObject *RenderData_SaveRenderedImage ( BPy_RenderData * self, PyObject *args )
if( strlen(self->renderContext->pic) + strlen(name_str) > sizeof(filepath)-1 )
return EXPP_ReturnPyObjError( PyExc_ValueError, "full filename too long" );
if zbuff !=0 zbuff = 1; //required 1/0
BLI_strncpy( filepath, self->renderContext->pic, sizeof(filepath) );
strcat(filepath, name_str);

@ -1070,7 +1070,7 @@ static void threaded_tile_processor(Render *re)
RenderPart *pa, *nextpa;
RenderResult *rr= re->result;
rctf viewplane= re->viewplane;
int maxthreads, rendering=1, counter= 1, drawtimer=0, hasdrawn, minx;
int maxthreads, rendering=1, counter= 1, drawtimer=0, hasdrawn, minx=0;
if(rr==NULL)
return;