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>2021-07-07 20:21:20 +0300
committerJeroen Bakker <jeroen@blender.org>2021-07-26 09:11:52 +0300
commitae7be84e2d6cc55102682793baffb415f03ab911 (patch)
tree0907c59cb74b7e0c0cbd62b6b0ec5f5aff3db816 /blenderkit/search.py
parent29db4b5feb893fdd02cd45b12037e0e5ac3cd22c (diff)
BlenderKit: fix an error when trying to assign material to unsupported object type
-do same warning for drag-drop although that can be now further improved since it seems ray cast to other object types works already) -remove some old prints
Diffstat (limited to 'blenderkit/search.py')
-rw-r--r--blenderkit/search.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/blenderkit/search.py b/blenderkit/search.py
index 3683a1ed..310d1138 100644
--- a/blenderkit/search.py
+++ b/blenderkit/search.py
@@ -443,14 +443,14 @@ def search_timer():
result_field.append(asset_data)
# Get ratings from BlenderKit server
- # if utils.profile_is_validator():
user_preferences = bpy.context.preferences.addons['blenderkit'].preferences
api_key = user_preferences.api_key
headers = utils.get_headers(api_key)
- for r in rdata['results']:
- if ratings_utils.get_rating_local(asset_data['id']) is None:
- rating_thread = threading.Thread(target=ratings_utils.get_rating, args=([r['id'], headers]), daemon=True)
- rating_thread.start()
+ if utils.profile_is_validator():
+ for r in rdata['results']:
+ if ratings_utils.get_rating_local(asset_data['id']) is None:
+ rating_thread = threading.Thread(target=ratings_utils.get_rating, args=([r['id'], headers]), daemon=True)
+ rating_thread.start()
wm[search_name] = result_field
wm['search results'] = result_field