1
$\begingroup$

I have two items showing on my screen layout drop-down list (blender 2.71). Clicking on them takes me to the file browser screen, where the screen layout list doesn't show, so I can really delete them. If I click Back to Previous, it takes me to the addons screen. How can I get rid of these two items, or clear the screen layout list?

$\endgroup$

2 Answers 2

2
$\begingroup$

The following code will remove all screens from bpy.data.screens except the last one (because there must always be at least one screen):

import bpy

for screen in bpy.data.screens:
    bpy.ops.screen.delete({'screen': screen})

There is no RNA method to remove screens. In general, you shouldn't deal with screens a lot with Python scripts, because the API is incomplete and not fully working (joining is buggy and requires coordinates of the split/join widgets for instance).

Modal areas like the file selector a special, as well as other maximized areas, which create a additional, temporary screen.

$\endgroup$
3
  • $\begingroup$ Thanks for the reply CoDEmanX. Unfortunately, the code didn't work, because for some reason, Blender doesn't recognize these two screen names in the list as layout screens. It deletes the current screen layout. Is there any other way to reset the screen settings to the default Blender list? $\endgroup$
    – MikeR
    Aug 15, 2014 at 15:33
  • $\begingroup$ I just replaced the startup.blend file with one from a previous version I had, and that fixed the problem. Thanks anyway. $\endgroup$
    – MikeR
    Aug 15, 2014 at 15:48
  • $\begingroup$ there is actually no default set of screens, as in from the factory settings. the ones you call default screen come from the startup.blend as you already discovered. It's not ideal IMO this way, but there is currently no other way than to replace that .blend $\endgroup$
    – CodeManX
    Aug 15, 2014 at 19:56
0
$\begingroup$

You say it takes you to a file browser screen. Change the window type to the Info type instead of File Browser in the header. If the header isn't visible, there should be "+" to make it visible again. Once you have the Info screen header you should be able to delete that screen layout type. Repeat as needed for other layouts.

$\endgroup$
2
  • 1
    $\begingroup$ if the area is maximized, then it's impossible to change the space type. you need to use the back to previous button. $\endgroup$
    – CodeManX
    Aug 15, 2014 at 19:54
  • $\begingroup$ That's correct, the area was maximized so I couldn't change the type. But when I used the previous button, it took me to a maximized addons screen. The only way I found to fix it is replacing the startup.blend file. $\endgroup$
    – MikeR
    Aug 15, 2014 at 20:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .