Script organization

Hello,
I have a script that is called on every frame change. But I also need some initialisation (set constants and so on).
As these scripts are called every frame, I can’t make my initialisations in them. So I have to define my intialisations in another script.
So I tried to write a second script, called onLoad.
But how do I make the values defined in this second script known by the one called every frame ?
Or am I organizing my scripts in the wrong way ?
Thanks in advance
Francois

I don’t know if there are blender-wide globals for scripts. I’m afraid there are not

The workaround I’d do in your place is to have the onLoad script write a text buffer (easy) within Blender (Take my BMG Blender Mechanical Gears script. Script BMGs does this)

Once the text buffer is there your OnFrameChange script can read it!

Possibly you can write a Python fragment and execute it?

Stefano

Thank you Stefano
Where can I see your BMG Blender Mechanical Gears script ?
Francois

LInk was here on forum, that’s why I didn’t include it :wink:

http://www.selleri.org/Blender

Stefano

try the Registry module :
http://www.blender.org/modules/documentation/234PythonDoc/Registry-module.html

a test:
http://jmsoler.free.fr/didacticiel/blender/tutor/cpl_meshexplosion.htm