fix: add items_to_remove
This commit is contained in:
parent
c609f72080
commit
5830fe1abb
@ -106,9 +106,12 @@ def clean_scene():
|
||||
try:
|
||||
sub_collection_to_avoid = [bpy.data.linestyles['LineStyle'], bpy.data.materials['Dots Stroke']]
|
||||
type_collection = getattr(bpy.data, type_name)
|
||||
for item in type_collection:
|
||||
if item not in sub_collection_to_avoid :
|
||||
items_to_remove = [i for i in type_collection if i not in sub_collection_to_avoid]
|
||||
for item in items_to_remove:
|
||||
try:
|
||||
type_collection.remove(item)
|
||||
except:
|
||||
continue
|
||||
except:
|
||||
continue
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user