Add #5496. Objects from linked ifc files can now be snapped.

This commit is contained in:
Bruno Perdigão
2025-03-11 12:37:47 -03:00
parent db1d8d938f
commit 031540e982
2 changed files with 4 additions and 1 deletions
@@ -984,9 +984,12 @@ class PolylineOperator:
self.tool_state.plane_method = None
self.tool_state.mode = "Mouse"
self.visible_objs = tool.Raycast.get_visible_objects(context)
# print(self.visible_objs)
for obj in self.visible_objs:
self.objs_2d_bbox.append(tool.Raycast.get_on_screen_2d_bounding_boxes(context, obj))
print(self.objs_2d_bbox)
detected_snaps = tool.Snap.detect_snapping_points(context, event, self.objs_2d_bbox, self.tool_state)
print("detected_snaps", detected_snaps)
self.snapping_points = tool.Snap.select_snapping_points(context, event, self.tool_state, detected_snaps)
tool.Polyline.calculate_distance_and_angle(context, self.input_ui, self.tool_state)
+1 -1
View File
@@ -376,7 +376,7 @@ class Snap(bonsai.core.tool.Snap):
if tool.Raycast.intersect_mouse_2d_bounding_box(mouse_pos, bbox_2d, offset):
if obj.visible_in_viewport_get(
context.space_data
): # Check for local view and local collections for this viewport and object
) or obj.library: # Check for local view and local collections for this viewport and object
objs_to_raycast.append(obj)
# Polyline