G'day,
I'm using Blender 2.78 64 bit in Windows 7. I'm trying to use the Scripting Screen layout to run, debug and edit python scripts.
When I press the Run Script button in Blender, the screen layout reverts to the default layout which closes the Scripting Window and the Python Interactive Console. Then to rerun the script I need to reopen the Scripting layout and import the python code back into the Scripting window (very frustrating).
Is there any way to stop Blender from reverting back to the default layout when python scripts are run?
Or, is there a way to make the Scripting screen layout the default layout?
I have seen some suggestions about including input() or raw_input() at the end of the code to prevent the python console from closing. This solution has not worked, raw_input() causes Blender to hang (python console is 3.5.2). Surely there must be a better solution than using raw_input() to pause completion of the script in any case.
Any suggestions would be greatly appreciated.
Thanks.
bpy.context.area.type = 'VIEW_3D'
. -- at the end you could switch back toTEXT_EDITOR
. $\endgroup$