Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'blenderkit/resolutions.py')
-rw-r--r--blenderkit/resolutions.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/blenderkit/resolutions.py b/blenderkit/resolutions.py
index 62118d7f..89ddb6d6 100644
--- a/blenderkit/resolutions.py
+++ b/blenderkit/resolutions.py
@@ -359,7 +359,8 @@ def unpack_asset(data):
image.filepath = fp # bpy.path.abspath(fp)
image.filepath_raw = fp # bpy.path.abspath(fp)
image.save()
- image.unpack(method='REMOVE')
+ if len(image.packed_files) > 0:
+ image.unpack(method='REMOVE')
bpy.ops.wm.save_mainfile(compress=False)
# now try to delete the .blend1 file