Automatically execute python scripte
-
Hi , I want to automatically execute a python script(hello world ) when i open Cinema4D .
where i create python script -
Hi @serco, there is multiple way to execute a script automatically when Cinema 4D is opened.
- Use python_init.py, this force you to add your script into the temp folder. Bu it can be done for a particular instance of a Cinema 4D or it can also be applied to all Cinema 4D versions that use a given python version.
- Implement a Plugin and react to PluginMessage various event are sent to Python, and you can hook into them to execute your code. This require to have a Python plugin loaded by Cinema 4D.
- Depending of your needs there is c4dpy which act as a Python Interpreter, where you can pass directly your Python file as an argument. Then again depending of your need you may be able to start what you want to do next.
Cheers,
Maxime.