[Bf-python] Script link additions
Ken Hughes
khughes at pacific.edu
Fri May 20 03:03:11 CEST 2005
Willian Padovani Germano wrote:
> Hi,
>
> Been busy this week (sorry JMS and Campbell, had no time to work on
> updating scripts and checking patches yet) with a few additions
> committed today that need a little explaining:
>
> The "Render" script link (slink for short) was added. *It runs twice*,
> before and after rendering. Before rendering Blender.event is "Render"
> and after, "PostRender". This was done so render slinks can clean up
> whatever data they created solely for rendering.
>
> So suggested is that "Render" slinks do something like this (not
> mentioning the case of script being run with ALT+P as a normal script):
>
> import Blender
>
> if Blender.event == "Render":
> # prepare for rendering...
> elif Blender.event == "PostRender":
> # clean up, revert changes if needed...
>
Just a quick note: I noticed that blender/source/python/api2_2x/doc/Object.py
doesn't mention the new event types, nor does the files for the other
classes with script link methods....
Ken
More information about the Bf-python
mailing list