I'm trying to write cinema 4d python script, that will auto-run render function when scene is opened. How to run Python script at moment scene is opened?
unfortunately the is no feature in Cinema that will let you execute a script when a document has been loaded.
welcome to the forum and thanks for reaching us.
The workflow you are trying to achieve is a bit strange. Executing a script to launch a render when you open a scene is not something you always want to be active.
as @zipit said, if you want to launch render you can use c4dpy or our CommandLine
You could also create a script that ask for a folder and than open, launch the render and close the scene.
In our example you will find an example on how to launch a render
Using a MessageData will not really help since the message sent when you open a document need to be catched by the Message function and the MessageData only rely on CoreMessage.
Of course if you have any question feel free to ask. (we like to keep one thread per question)
I forgot in c++ you have the SceneHookData but it's not available in python.
i'll set that thread to solved tomorrow without further feedback