mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 10:11:46 +00:00
Fix snap to exclude objects that are in a hidden collection.
This commit is contained in:
@@ -321,11 +321,9 @@ class Snap(bonsai.core.tool.Snap):
|
|||||||
for obj, bbox_2d in objs_2d_bbox:
|
for obj, bbox_2d in objs_2d_bbox:
|
||||||
if obj.type in {"MESH", "EMPTY"} and bbox_2d:
|
if obj.type in {"MESH", "EMPTY"} and bbox_2d:
|
||||||
if tool.Raycast.intersect_mouse_2d_bounding_box(mouse_pos, bbox_2d, offset):
|
if tool.Raycast.intersect_mouse_2d_bounding_box(mouse_pos, bbox_2d, offset):
|
||||||
if space.local_view:
|
if obj.visible_in_viewport_get(context.space_data): # Check for local view and local collections for this viewport and object
|
||||||
if obj.local_view_get(context.space_data):
|
|
||||||
objs_to_raycast.append(obj)
|
objs_to_raycast.append(obj)
|
||||||
else:
|
|
||||||
objs_to_raycast.append(obj)
|
|
||||||
# Obj
|
# Obj
|
||||||
snap_obj, hit, face_index = cast_rays_and_get_best_object(objs_to_raycast, mouse_pos)
|
snap_obj, hit, face_index = cast_rays_and_get_best_object(objs_to_raycast, mouse_pos)
|
||||||
if hit is not None:
|
if hit is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user