Hey everyone,
I would like to know if Cinema 4D supports pre-render and post-render Python script workflows. I use the command line to render files, but unfortunately, I haven't found a suitable method to call a Python script to modify the file before rendering. Here is the rendering command line I use:
"C:\Program Files\MAXON\CINEMA 4D 2024\CINEMA 4D.exe"-nogui -frame 0 0 1 -render "C:\Renderer\render.c4d" -oresolution "1920" "1080" -oformat "PNG" -oimage "C:\Renderer\output\render"
I tried using the pyp plugin to execute Python scripts when starting the software to modify the project file, but when I use the '-render' parameter, the Python code in the pyp plugin is executed after the rendering is complete. I have read other forum posts, and developers seem to indicate that Python plugins cannot adjust the command line execution priority, and the '-render' parameter always takes precedence. So, the pyp plugin may not be a good solution.
It seems quite challenging to execute a Python script to modify the file before rendering in the C4D command line. If the '-render' parameter is used, no modifications can be made to the file. Unless the modification is saved directly to the file, but this method is destructive.
Feel free to let me know if there are any specific details or changes you'd like to include!