diff options
author | Vilém Duha <vilda.novak@gmail.com> | 2020-03-18 15:34:37 +0300 |
---|---|---|
committer | Vilém Duha <vilda.novak@gmail.com> | 2020-03-18 15:34:49 +0300 |
commit | 6665bb9820c46c560420d3b5b2e5ab4c02e3125a (patch) | |
tree | fdb850f817c5f7113f36cc38f44bd6bd2c24336c /blenderkit/upload.py | |
parent | e61a7e8bfe226aa1db7b5126f50cd9e7ba295239 (diff) |
BlenderKit: fixes
-first run now saves preferences to not appear again on each blender start
-fix possible error with assetbar shortcuts (wrong index)
-validation - update status in search results on verification status change
Diffstat (limited to 'blenderkit/upload.py')
-rw-r--r-- | blenderkit/upload.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/blenderkit/upload.py b/blenderkit/upload.py index f2f295e5..980fbf7f 100644 --- a/blenderkit/upload.py +++ b/blenderkit/upload.py @@ -810,6 +810,17 @@ class AssetVerificationStatusChange(Operator): def execute(self, context): preferences = bpy.context.preferences.addons['blenderkit'].preferences + # update status in search results for validator's clarity + sr = bpy.context.scene['search results'] + sro = bpy.context.scene['search results orig']['results'] + + for r in sr: + if r['id'] == self.asset_id: + r['verification_status'] = self.state + for r in sro: + if r['id'] == self.asset_id: + r['verificationStatus'] = self.state + thread = threading.Thread(target=verification_status_change_thread, args=(self.asset_id, self.state, preferences.api_key)) thread.start() |