trueslash
(trueslash)
November 3, 2003, 10:43pm
1
Hi all
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 :
Launching Blender.
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.
Rendering
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 ?
leon
(leon)
November 4, 2003, 12:22am
2
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?
trueslash
(trueslash)
November 4, 2003, 9:40pm
3
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 ?
trueslash
(trueslash)
November 7, 2003, 11:05pm
4
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
Thx
flimz
(flimz)
November 11, 2003, 2:22pm
5
Nice one! But can you tell me what the frame change thing is all about/what it is?
Regards,
Tim
trueslash
(trueslash)
November 11, 2003, 10:08pm
6
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.