I am trying to use Python to programatically reload the Blender start-up file (equivalent to pressing Cmd+N).
I have tried using the command:
However, this also reloads the currently running Python script. While the script appears to try to run until completion, certain operations are no longer working. In addition to the script window reloading the default script, I am getting 'incorrect context' errors from running the rest of the script:
Code: Select all
RuntimeError: Operator bpy.ops.wm.collada_import.poll() failed, context is incorrect
I have attempted other ways of clearing the scene, for example deleting all objects in it. However, I wish to also change the settings such as lighting and render settings back to their defaults.
As some background, I wish to reload the scene from scratch as I am importing .dae files. These bring with them strange changes to the scaling, lighting and units of the scene, which I wish to reset after each object has been imported and rendered.
Many thanks for any advice anyone is able to offer...