[Bf-extensions-cvs] [01e5dd5d] master: BlenderKit: fix a bug where bound box wasn't drawn if in the area where normally asset bar is.
Vilém Duha
noreply at git.blender.org
Wed Sep 4 09:08:17 CEST 2019
Commit: 01e5dd5dd8f03b647b207a88d5a9bafd1cc49dc5
Author: Vilém Duha
Date: Tue Sep 3 10:04:15 2019 +0200
Branches: master
https://developer.blender.org/rBA01e5dd5dd8f03b647b207a88d5a9bafd1cc49dc5
BlenderKit: fix a bug where bound box wasn't drawn if in the area where normally asset bar is.
===================================================================
M blenderkit/ui.py
===================================================================
diff --git a/blenderkit/ui.py b/blenderkit/ui.py
index 966d35bb..7d60ef8c 100644
--- a/blenderkit/ui.py
+++ b/blenderkit/ui.py
@@ -1096,6 +1096,7 @@ def mouse_in_area(mx, my, x, y, w, h):
def mouse_in_asset_bar(mx, my):
ui_props = bpy.context.scene.blenderkitUI
+
if ui_props.bar_y - ui_props.bar_height < my < ui_props.bar_y \
and mx > ui_props.bar_x and mx < ui_props.bar_x + ui_props.bar_width:
return True
@@ -1401,7 +1402,7 @@ class AssetBarOperator(bpy.types.Operator):
else:
result = False
- if ui_props.dragging and not mouse_in_asset_bar(mx, my) and mouse_in_region(r, mx, my):
+ if ui_props.dragging and mouse_in_region(r, mx, my):
ui_props.has_hit, ui_props.snapped_location, ui_props.snapped_normal, ui_props.snapped_rotation, face_index, object, matrix = mouse_raycast(
context, mx, my)
# MODELS can be dragged on scene floor
More information about the Bf-extensions-cvs
mailing list