From 0941b635cc762eeca9383dbb3c10ea580c5aa547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vil=C3=A9m=20Duha?= Date: Wed, 21 Oct 2020 12:37:11 +0200 Subject: BlenderKit: Fix Selected model panel Operator exec context wasn't set Fast rating operator had wrong numbers in enum removed a hacky fix for BGL bug that was introduced during 2.91 develpment and now fixed --- blenderkit/ratings.py | 8 +++++--- blenderkit/ui.py | 16 ++++++++-------- blenderkit/ui_panels.py | 2 ++ blenderkit/upload.py | 2 +- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/blenderkit/ratings.py b/blenderkit/ratings.py index 35c3bf3c..ef6cc6a8 100644 --- a/blenderkit/ratings.py +++ b/blenderkit/ratings.py @@ -346,14 +346,16 @@ class FastRateMenu(Operator): ('3', '3', ''), ('4', '4', ''), ('5', '5', ''), + ('6', '6', ''), + ('8', '8', ''), ('10', '10', ''), ('15', '15', ''), ('20', '20', ''), ('50', '50', ''), ('100', '100', ''), - ('150', '100', ''), - ('200', '100', ''), - ('250', '100', ''), + ('150', '150', ''), + ('200', '200', ''), + ('250', '250', ''), ], default='0', update=update_ratings_work_hours_ui ) diff --git a/blenderkit/ui.py b/blenderkit/ui.py index b6bbbd64..7923de99 100644 --- a/blenderkit/ui.py +++ b/blenderkit/ui.py @@ -738,14 +738,14 @@ def draw_callback_2d_search(self, context): highlight = (1, 1, 1, .2) # highlight = (1, 1, 1, 0.8) # background of asset bar - if ui_props.hcount>0: - #this fixes a draw issue introduced in blender 2.91. draws a very small version of the image to avoid problems - # with alpha. Not sure why this works. - img = utils.get_thumbnail('arrow_left.png') - ui_bgl.draw_image(0, 0, 1, - 1, - img, - 1) + # if ui_props.hcount>0: + # #this fixes a draw issue introduced in blender 2.91. draws a very small version of the image to avoid problems + # # with alpha. Not sure why this works. + # img = utils.get_thumbnail('arrow_left.png') + # ui_bgl.draw_image(0, 0, 1, + # 1, + # img, + # 1) if not ui_props.dragging and ui_props.hcount>0: search_results = s.get('search results') search_results_orig = s.get('search results orig') diff --git a/blenderkit/ui_panels.py b/blenderkit/ui_panels.py index ed128458..eaf5d454 100644 --- a/blenderkit/ui_panels.py +++ b/blenderkit/ui_panels.py @@ -1083,6 +1083,8 @@ def draw_asset_context_menu(self, context, asset_data): # validation if utils.profile_is_validator(): layout.label(text='Validation tools:') + layout.operator_context = 'EXEC_DEFAULT' + if asset_data['verificationStatus'] != 'uploaded': op = layout.operator('object.blenderkit_change_status', text='set Uploaded') op.asset_id = asset_data['id'] diff --git a/blenderkit/upload.py b/blenderkit/upload.py index ef637d79..cd72fda7 100644 --- a/blenderkit/upload.py +++ b/blenderkit/upload.py @@ -836,7 +836,7 @@ class AssetVerificationStatusChange(Operator): return {'FINISHED'} def invoke(self, context, event): - print(self.state) + # print(self.state) if self.state == 'deleted': wm = context.window_manager return wm.invoke_props_dialog(self) -- cgit v1.2.3