Merge branch '194-smooth-brush-size-reset' into 'develop'
Resolve "Brush deleted on join" See merge request slumber/multi-user!124
This commit is contained in:
commit
ff1630f9cc
@ -101,11 +101,17 @@ def get_state_str(state):
|
||||
|
||||
|
||||
def clean_scene():
|
||||
for type_name in dir(bpy.data):
|
||||
to_delete = [f for f in dir(bpy.data) if f not in ['brushes', 'palettes']]
|
||||
for type_name in to_delete:
|
||||
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:
|
||||
type_collection.remove(item)
|
||||
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