From 24f3918769ae41500a47c80b65707e8204c73464 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Fri, 27 Jan 2023 14:32:41 +1100 Subject: [PATCH] Fix #2705. Annotation draw error when splines are outside the zoom level of the screen. --- src/blenderbim/blenderbim/bim/module/drawing/decoration.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/blenderbim/blenderbim/bim/module/drawing/decoration.py b/src/blenderbim/blenderbim/bim/module/drawing/decoration.py index 15ef458c92..f62f1d5db5 100644 --- a/src/blenderbim/blenderbim/bim/module/drawing/decoration.py +++ b/src/blenderbim/blenderbim/bim/module/drawing/decoration.py @@ -1243,6 +1243,8 @@ class SectionLevelDecorator(LevelDecorator): v1 = verts[1] p0 = location_3d_to_region_2d(region, region3d, v0) p1 = location_3d_to_region_2d(region, region3d, v1) + if not p0 or not p1: + continue dir = p1 - p0 if dir.length < 1: continue