November 3, 2003, 10:43pm
I’d like to know if there is a way to have a python script automatically executed when blender is launched.
Here is the process that I’d like to have :
Opening a file with all the 3D objects.
Using Python, reading a template that tells what objects are needed and where they are needed.
Using Python, putting everything in the right place.
Do you think it is doable ?
I think that if i can automatically execute a script once blender is launched and if I can render the scene from Python, it schould work.
Any hint ?
November 4, 2003, 12:22am
I think (but not 100%) that scripts linked to “frame change” will execute when you open the file.
Not sure if you can kick off a render from inside python though.
Just to satisfy my curiosity, what are you trying to do?
November 4, 2003, 9:40pm
Thx for yhe answer
I’m trying to generate a picture from a text. (natural language processing prject)
Anyway, I’ve just started to use Blender and I don’t know how to link a script
If I can’t render the scene directly, is it possible to save the scene, close blender and then open it again with the -a option ?
November 7, 2003, 11:05pm
I found how to link a script
Everything is working now : I launch Blender with the -b and the -f 1 options and the script linked to the frame change event is executed before the render
November 11, 2003, 2:22pm
Nice one! But can you tell me what the frame change thing is all about/what it is?
November 11, 2003, 10:08pm
I’ve just started with Blender but here is what I understod from what I read:
A frame change event is generated every time the frame changes in your scene but also when you launch blender and when you render the scene
You can link a script to this event so that the script will be executed each time the event is generated.