[Bf-python] is there yet a function to link the script to the scene ?

Willian Padovani Germano wgermano at ig.com.br
Tue Jun 15 06:33:35 CEST 2004


Hi Jean-Michel,

----- Original Message -----
From: "jean-michel soler" <jean-michel.soler at wanadoo.fr>
To: <bf-python at blender.org>
Sent: Monday, June 14, 2004 1:54 AM
Subject: [Bf-python] is there yet a function to link the script to the scene ?


> is there yet a function to link the script to the scene ?
> Just to prevent that the user carries out the operation manually.

Not yet, it's possible to check Blender.link and .bylink to flag an error if a
script isn't supposed to be used as a scriptlink, though, but not to set a
scriptlink or check the ones available in general.

I was playing a little with this part today (didn't know enough about
scriptlinks' internals yet) and added a test method to current cvs Blender:

scene.getScriptlinks(eventname)
#  eventname can be "OnLoad", "FrameChanged", "Redraw"

We can add .clearScriptlinks(), .addScriptlink(textName) and
.removeScriptlink(textName), for example.  Is this ok / any suggestion?

Implementation note: much of the code can be made general, with only a tiny hook
for each relevant type: scene, object, lamp, camera, world.

--
Willian, wgermano at ig.com.br




More information about the Bf-python mailing list