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:
authorVilém Duha <vilda.novak@gmail.com>2020-09-19 18:45:45 +0300
committerVilém Duha <vilda.novak@gmail.com>2020-09-19 19:22:31 +0300
commit0f7cd2f95434f470f2a88c6d365539a1fddbb0d9 (patch)
treefe8d03622a4fd9107d29fa81d60a56b354ca9daf
parente84b6c2587ae626ee24ff44a76461ef07b34321f (diff)
BlenderKit: fix problems in asset parsing
-rw-r--r--blenderkit/search.py2
-rw-r--r--blenderkit/ui.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/blenderkit/search.py b/blenderkit/search.py
index 5ae8aa48..18a6aeae 100644
--- a/blenderkit/search.py
+++ b/blenderkit/search.py
@@ -219,7 +219,7 @@ def parse_result(r):
if len(r['files']) > 0:
allthumbs = []
- durl, tname = None, None
+ durl, tname, small_tname = '','',''
for f in r['files']:
if f['fileType'] == 'thumbnail':
tname = paths.extract_filename_from_url(f['fileThumbnailLarge'])
diff --git a/blenderkit/ui.py b/blenderkit/ui.py
index 38cb494a..bf2785ed 100644
--- a/blenderkit/ui.py
+++ b/blenderkit/ui.py
@@ -1024,10 +1024,10 @@ def is_rating_possible():
while ad is None or (ad is None and ao_check.parent is not None):
s = bpy.context.scene
ad = ao_check.get('asset_data')
- if ad is not None:
+ if ad is not None and ad.get('assetBaseId') is not None:
s['assets rated'] = s.get('assets rated',{})
- rated = s['assets rated'].get(ad.get('assetBaseId'))
+ rated = s['assets rated'].get(ad['assetBaseId'])
# originally hidden for already rated assets
return True, rated, ao_check, ad
elif ao_check.parent is not None: