diff options
author | Vilém Duha <vilda.novak@gmail.com> | 2020-10-27 10:01:57 +0300 |
---|---|---|
committer | Vilém Duha <vilda.novak@gmail.com> | 2020-10-27 10:03:35 +0300 |
commit | df726ecd2bad8cdcdfec57ab0d161fa8ac4ef247 (patch) | |
tree | 2ab2509b3ce02fb8f2f59e8a044e8f64a736566f | |
parent | 8cdb486ba8df286355a406af6b0164cbcb50ade9 (diff) |
BlenderKit: fix T75935
Disable purging algorithm, was too simple and was causing trouble like purging background scene.
-rw-r--r-- | blenderkit/download.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/blenderkit/download.py b/blenderkit/download.py index a80678fc..e3a69ea8 100644 --- a/blenderkit/download.py +++ b/blenderkit/download.py @@ -80,7 +80,8 @@ def check_missing(): def check_unused(): '''find assets that have been deleted from scene but their library is still present.''' - + #this is obviously broken. Blender should take care of the extra data automaticlaly + return; used_libs = [] for ob in bpy.data.objects: if ob.instance_collection is not None and ob.instance_collection.library is not None: @@ -96,7 +97,7 @@ def check_unused(): used_libs.append(ps.settings.instance_collection) for l in bpy.data.libraries: - if l not in used_libs: + if l not in used_libs and l.getn('asset_data'): print('attempt to remove this library: ', l.filepath) # have to unlink all groups, since the file is a 'user' even if the groups aren't used at all... for user_id in l.users_id: |