diff options
author | Vilém Duha <vilda.novak@gmail.com> | 2020-02-08 00:17:30 +0300 |
---|---|---|
committer | Vilém Duha <vilda.novak@gmail.com> | 2020-02-08 00:17:30 +0300 |
commit | e0319c485080dec1dd3f6ff10aec89ed287c5636 (patch) | |
tree | 43bb7a24dbedeeee30cb89d1845db4eef0f9ad44 | |
parent | 43f46021b09fdf8fc56ab46e5d7346a398b33b3d (diff) |
BlenderKit: fix assetbar not reacting
commenting outh the fix for the mouse in assetbar function, needs more triage
-rw-r--r-- | blenderkit/ui.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/blenderkit/ui.py b/blenderkit/ui.py index f05012aa..ffeaf4f6 100644 --- a/blenderkit/ui.py +++ b/blenderkit/ui.py @@ -1117,16 +1117,16 @@ def mouse_in_asset_bar(mx, my): s = bpy.context.scene ui_props = bpy.context.scene.blenderkitUI - search_results = s.get('search results') - if search_results == None: - return False - - w_draw1 = min(ui_props.wcount + 1, len(search_results) - b * ui_props.wcount - ui_props.scrolloffset) - end = ui_props.bar_x + (w_draw1) * ( - ui_props.margin + ui_props.thumb_size) + ui_props.margin + ui_props.drawoffset + 25 + # search_results = s.get('search results') + # if search_results == None: + # return False + # + # w_draw1 = min(ui_props.wcount + 1, len(search_results) - b * ui_props.wcount - ui_props.scrolloffset) + # end = ui_props.bar_x + (w_draw1) * ( + # ui_props.margin + ui_props.thumb_size) + ui_props.margin + ui_props.drawoffset + 25 if ui_props.bar_y - ui_props.bar_height < my < ui_props.bar_y \ - and mx > ui_props.bar_x and mx < end: + and mx > ui_props.bar_x and mx < ui_props.bar_x + ui_props.bar_width: return True else: return False @@ -1790,7 +1790,7 @@ class UndoWithContext(bpy.types.Operator): # def modal(self, context, event): # return {'RUNNING_MODAL'} - message = StringProperty('Undo Message', default='BlenderKit operation') + message: StringProperty('Undo Message', default='BlenderKit operation') def execute(self, context): C_dict = bpy.context.copy() |