I want to achieve following functionality using python in blender -
From above points I have achieved all points. But my problem is when i open a blender file using following script -
obj_root = pathlib.Path("I:/PythonBlender/first.blend") bpy.ops.wm.open_mainfile(filepath= str(obj_root))
the old file running the python scripts is closed and this new first.blend file is opened in blender. I want my python scripts to keep running and the scenes should load as an addon. and remove the addon scenes after rendering is finished. I also want to know what approach you will follow to achieve the above functionality with proper memory management and loading, unloading of textures and other files after rendering is done.