[Bf-python] Script link additions
Willian Padovani Germano
wgermano at ig.com.br
Mon May 9 06:48:25 CEST 2005
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...
I disabled "FrameChanged" during renders, since there's a render event
now. To standardize things it's better to use FrameChanged only for
what it says: frame changes. It's still used in Scene changes, too, not
sure if it should go away there and be substituted by "OnLoad".
All slinks can also be disabled now via "blender -y" or the new button
at the script buttons tab. Adding slinks has also changed (improved?) a
bit, just try to see.
The other addition is called "space handlers", but I'll put it in
another email, this one is big enough.
--
Willian
More information about the Bf-python
mailing list