Fixed error for measure tool when working with top or side view.

This commit is contained in:
Bruno Perdigão
2024-08-26 15:38:44 -03:00
parent 1be025ed86
commit 6dcbd98769
+2 -1
View File
@@ -328,7 +328,8 @@ class Snap(bonsai.core.tool.Snap):
if not cls.snap_plane_method:
camera_rotation = rv3d.view_rotation
plane_origin = Vector((0, 0, 0))
plane_normal = Vector((0, 1, 1, 1)) * Vector((camera_rotation))
view_direction = Vector((0, 0, -1)) @ camera_rotation.to_matrix().transposed()
plane_normal = view_direction.normalized()
if cls.snap_plane_method == "XY" or (not cls.snap_plane_method and cls.snap_axis_method in {"X", "Y"}):
if cls.use_default_container: