[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14170] trunk/blender/source/blender/ python/api2_2x: saveRenderedImage dosnt work in backgrond mode, so added a warning in the docs and an exception if called.
Campbell Barton
ideasman42 at gmail.com
Wed Mar 19 11:37:19 CET 2008
Revision: 14170
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14170
Author: campbellbarton
Date: 2008-03-19 11:37:19 +0100 (Wed, 19 Mar 2008)
Log Message:
-----------
saveRenderedImage dosnt work in backgrond mode, so added a warning in the docs and an exception if called.
Modified Paths:
--------------
trunk/blender/source/blender/python/api2_2x/doc/Render.py
trunk/blender/source/blender/python/api2_2x/sceneRender.c
Modified: trunk/blender/source/blender/python/api2_2x/doc/Render.py
===================================================================
--- trunk/blender/source/blender/python/api2_2x/doc/Render.py 2008-03-19 09:26:01 UTC (rev 14169)
+++ trunk/blender/source/blender/python/api2_2x/doc/Render.py 2008-03-19 10:37:19 UTC (rev 14170)
@@ -440,6 +440,7 @@
@type filename: string
@since: 2.40
@requires: You must have an image currently rendered before calling this method
+ @warning: This wont work in background mode. use renderAnim instead.
"""
def play():
Modified: trunk/blender/source/blender/python/api2_2x/sceneRender.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/sceneRender.c 2008-03-19 09:26:01 UTC (rev 14169)
+++ trunk/blender/source/blender/python/api2_2x/sceneRender.c 2008-03-19 10:37:19 UTC (rev 14170)
@@ -534,7 +534,11 @@
if( !PyArg_ParseTuple( args, "s|i", &name_str, &zbuff ) )
return EXPP_ReturnPyObjError( PyExc_TypeError,
"expected a filename (string) and optional int" );
-
+
+ if (G.background)
+ return EXPP_ReturnPyObjError( PyExc_RuntimeError,
+ "saveRenderedImage does not work in background mode, use renderAnim() instead" );
+
if( strlen(self->renderContext->pic) + strlen(name_str)
>= sizeof(filepath) )
return EXPP_ReturnPyObjError( PyExc_ValueError,
More information about the Bf-blender-cvs
mailing list