Go to file
Campbell Barton fde215025e patch [#28218] During-render callback functionality
from Jesse Kaukonen (gekko) 

--- text from the patch.

Recently Campbell Barton added callback functionality for Python's usage, but this only includes pre- and post-render callbacks. There are no callbacks for the duration of the render. This patch adds the few lines required for executing a callback while Blender Render is working. The callback resides in the rendering pipeline stats function, so whenever statistics are printed, the callback is executed. This functionality is required if one wants to:

1) Observe what is happening while Blender is rendering via the command line
2) Add custom statistics that Blender prints while the renderer works
3) The user wants to continue executing his Python script without the code halting at bpy.ops.render.render()

Personally I'm currently using this for printing out more detailed progress reports at Renderfarm.fi (such as CPU time, time spent rendering, total progress in regards to the entire rendering process). Tested on Windows, Linux and OS X.

Example on how to use the callback:

  def statscall(context): print("Thanks for calling!")
  bpy.app.handlers.render_stats.append(statscall)
  bpy.ops.render.render(animation=False, write_still=True)
2011-08-31 10:43:22 +00:00
build_files OSX: additionally choice to link against python-framework again 2011-08-30 23:52:12 +00:00
doc BGE: Adding two new functions to bge.render to allow users to change the anisotropic filtering level used by textures: 2011-08-31 05:51:51 +00:00
extern Fix #28154: linux3-config.py doesn't exist 2011-08-21 13:31:46 +00:00
intern typo fix: end of lines ;; --> ; 2011-08-31 01:07:55 +00:00
release 2.5 Game UI: 2011-08-30 12:45:56 +00:00
source patch [#28218] During-render callback functionality 2011-08-31 10:43:22 +00:00
CMakeLists.txt * Removing mocap GSoC (is an addon already). 2011-08-28 14:21:44 +00:00
COPYING == docs == 2010-10-13 14:44:22 +00:00
GNUmakefile turns out recent commit made 'make' on its own fail. 2011-08-16 13:45:17 +00:00
SConstruct ups, syntax error, missing : 2011-08-25 15:18:54 +00:00