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:
authorVilem Duha <vilem.duha@gmail.com>2019-06-23 18:39:58 +0300
committerVilem Duha <vilem.duha@gmail.com>2019-06-24 22:30:05 +0300
commit746b6735394c1b0a9f25c9a87da961f389849c4a (patch)
treec4919cc2cdcb41381a5e40038444ea507c0067bf /blenderkit
parent0e53a9a38672790d5fbb9a1d4a935980824d4a84 (diff)
BlenderKit: don't search for thumbnail when uploading only metadata
Diffstat (limited to 'blenderkit')
-rw-r--r--blenderkit/upload.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/blenderkit/upload.py b/blenderkit/upload.py
index 31585a4f..ee4df45b 100644
--- a/blenderkit/upload.py
+++ b/blenderkit/upload.py
@@ -599,11 +599,11 @@ def start_upload(self, context, asset_type, as_new, metadata_only):
datafile = os.path.join(tempdir, BLENDERKIT_EXPORT_DATA_FILE)
# check if thumbnail exists:
-
- if not os.path.exists(export_data["thumbnail_path"]):
- props.upload_state = 'Thumbnail not found'
- props.uploading = False
- return {'CANCELLED'}
+ if not metadata_only:
+ if not os.path.exists(export_data["thumbnail_path"]):
+ props.upload_state = 'Thumbnail not found'
+ props.uploading = False
+ return {'CANCELLED'}
# first upload metadata to server, so it can be saved inside the current file
url = paths.get_api_url() + 'assets/'