1
$\begingroup$

Part of my code makes a new screen and so every time I test run my code it adds a new screen to this list. But I can't seem to delete them from the list? I highlight them and hit delete and nothing happens. How do I remove them? There are over 90 in this file now. I suppose I could rewrite my code so that I can use it to delete a bunch of screens instead of create them and just run that periodically, but that seems unnecessarily complex and tedious. How are you supposed to delete these Screens directly from the UI with no coding?

All the ones labelled 'Default.001' etc.

$\endgroup$
1
  • $\begingroup$ you meant screens, no 'scenes'... just answered how to delete your scenes :p $\endgroup$
    – alambre
    Commented Apr 5, 2022 at 2:25

2 Answers 2

1
$\begingroup$

your title said 'scenes' so I answered how to delete scenes..! for screens it seems to be different, you just clear its users and the screen should be gone on save/reload... here's an example of clearing all screens with a dot in the name

import bpy
screens = bpy.data.screens
kill = [s for s in screens if "." in s.name]
for x in kill: x.user_clear()

to delete from gui you can right click on the tab name > delete
hope this helps, sorry for confusion

$\endgroup$
0
$\begingroup$

The solution is to go to the Outliner and choose the Data API sub-editor, then untwirl the Screens and search for and check Runtime Data checkbox for the screens that you want to delete.

After this, save the file and reload and it’ll be cleaned.

$\endgroup$

You must log in to answer this question.

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