diff options
author | Vilém Duha <vilda.novak@gmail.com> | 2021-04-29 13:13:40 +0300 |
---|---|---|
committer | Vilém Duha <vilda.novak@gmail.com> | 2021-04-29 13:13:59 +0300 |
commit | e670cee07525af65395a13f30f57ca5e656771a1 (patch) | |
tree | 6b5433dd9521bb63770ea82849db190be9f1f1d6 /blenderkit/upload.py | |
parent | 452996ae951478853af3c1bcac3e0e1a26a6cab4 (diff) |
BlenderKit: improve right click menu
-basically a complete revamp of the code, enables to display asset information in a much cleaner way with more tooltips e.t.c.
-simplified floating asset preview - name needs to be fixed still, and tooltip generation cleaned
-added several new icons, deleted one unused
-improve a lot of tooltips
-fix rerender of thumbnails in unsaved files (would save assets into addon directory)
-reorganize some rating functions into ratings_utils.py
-new 'wrap' operator for web links, allows to have custom tooltips for each link
Diffstat (limited to 'blenderkit/upload.py')
-rw-r--r-- | blenderkit/upload.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/blenderkit/upload.py b/blenderkit/upload.py index cc72b92a..b1d20f94 100644 --- a/blenderkit/upload.py +++ b/blenderkit/upload.py @@ -580,13 +580,13 @@ def can_edit_asset(active_index=-1, asset_data=None): sr = bpy.context.window_manager['search results'] asset_data = dict(sr[active_index]) # print(profile, asset_data) - if asset_data['author']['id'] == profile['user']['id']: + if int(asset_data['author']['id']) == int(profile['user']['id']): return True return False class FastMetadata(bpy.types.Operator): - """Fast change of the category of object directly in asset bar.""" + """Edit metadata of the asset""" bl_idname = "wm.blenderkit_fast_metadata" bl_label = "Update metadata" bl_options = {'REGISTER', 'UNDO', 'INTERNAL'} @@ -731,6 +731,7 @@ class FastMetadata(bpy.types.Operator): active_asset = utils.get_active_asset_by_type(asset_type = self.asset_type) asset_data = active_asset.get('asset_data') + print('can edit asset?', can_edit_asset(asset_data=asset_data)) if not can_edit_asset(asset_data=asset_data): return {'CANCELLED'} self.asset_id = asset_data['id'] @@ -1298,7 +1299,7 @@ class AssetDebugPrint(Operator): class AssetVerificationStatusChange(Operator): """Change verification status""" bl_idname = "object.blenderkit_change_status" - bl_description = "Change asset ststus" + bl_description = "Change asset status" bl_label = "Change verification status" bl_options = {'REGISTER', 'UNDO', 'INTERNAL'} |