Fix T89812: 'Snap_Utilities_Line' - Projection error in orthographic view
This commit is contained in:
parent
4475cbd11a
commit
f418b29387
Notes:
blender-bot
2023-02-14 18:35:49 +01:00
Referenced by issue blender/blender#88449: Blender LTS: Maintenance Task 2.93 Referenced by issue blender/blender#88449, Blender LTS: Maintenance Task 2.93 Referenced by issue #89812, It can't snap vertices when using community addon 'Snap_Utilities_Line'. Referenced by issue #89062, Snap Utilities Line Addon Doesn't Work in 2.93.0
|
@ -21,7 +21,7 @@
|
|||
bl_info = {
|
||||
"name": "Snap_Utilities_Line",
|
||||
"author": "Germano Cavalcante",
|
||||
"version": (6, 9, 22),
|
||||
"version": (6, 9, 23),
|
||||
"blender": (2, 93, 0),
|
||||
"location": "View3D > TOOLS > Line Tool",
|
||||
"description": "Extends Blender Snap controls",
|
||||
|
|
|
@ -349,9 +349,13 @@ class GPU_Indices_Mesh():
|
|||
|
||||
far_ += depth_offset
|
||||
near += depth_offset
|
||||
fn = (far_ - near)
|
||||
winmat[2][2] = -(far_ + near) / fn
|
||||
winmat[2][3] = (-2 * far_ * near) / fn
|
||||
range = (far_ - near)
|
||||
if is_persp:
|
||||
winmat[2][2] = -(far_ + near) / range
|
||||
winmat[2][3] = (-2 * far_ * near) / range
|
||||
else:
|
||||
winmat[2][3] = -(far_ + near) / range
|
||||
|
||||
gpu.matrix.load_projection_matrix(winmat)
|
||||
|
||||
if self.draw_edges:
|
||||
|
|
Loading…
Reference in New Issue