This commit is contained in:
Andrej730
2025-09-29 09:58:16 +05:00
parent e228095391
commit 923e8423f9
6 changed files with 26 additions and 21 deletions
+1 -2
View File
@@ -486,7 +486,7 @@ class Project(bonsai.core.tool.Project):
@classmethod
def get_clipping_planes_normals(cls):
normals =[]
normals = []
for clipping_plane in tool.Project.get_project_props().clipping_planes:
plane = clipping_plane.obj
if not plane or not plane.data:
@@ -502,4 +502,3 @@ class Project(bonsai.core.tool.Project):
d2 = v3 - v2
normals.append((v1, d1.cross(d2).normalized()))
return normals
+1 -3
View File
@@ -165,7 +165,6 @@ class Raycast(bonsai.core.tool.Raycast):
return False
return True
@classmethod
def get_viewport_ray_data(
cls, context: bpy.types.Context, event: bpy.types.Event, mouse_pos: tuple[int, int] = None
@@ -455,7 +454,7 @@ class Raycast(bonsai.core.tool.Raycast):
if tool.Raycast.intersect_mouse_2d_bounding_box(mouse_pos, bbox_2d):
if tool.Raycast.object_is_visible_in_clipping_plane(obj):
objs_to_raycast.append(obj)
return objs_to_raycast
@classmethod
@@ -544,4 +543,3 @@ class Raycast(bonsai.core.tool.Raycast):
if lens < 50:
snap_threshold *= value
return snap_threshold
+5 -1
View File
@@ -491,7 +491,11 @@ class Snap(bonsai.core.tool.Snap):
"distance": 10, # High value so it has low priority
}
detected_snaps.append(snap_point)
detected_snaps = [snap for snap in detected_snaps if (tool.Raycast.point_is_visible_in_clipping_plane(snap["point"]) or snap["group"] == "Plane")]
detected_snaps = [
snap
for snap in detected_snaps
if (tool.Raycast.point_is_visible_in_clipping_plane(snap["point"]) or snap["group"] == "Plane")
]
return detected_snaps
@classmethod