From e670cee07525af65395a13f30f57ca5e656771a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vil=C3=A9m=20Duha?= Date: Thu, 29 Apr 2021 12:13:40 +0200 Subject: 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 --- blenderkit/upload.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'blenderkit/upload.py') 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'} -- cgit v1.2.3