After 949a2bb printing happens not fron N-panel (which is part of viewport) but from scene properties - so current context doesn't have region_3d anymore.

PS The same issue was there all along if you'd try to print the drawing from Camera Properties tab.
This commit is contained in:
Andrej730
2023-07-10 17:31:11 +05:00
parent 37f3ecc8c5
commit 88defa07ce
@@ -913,7 +913,8 @@ class SvgWriter:
def draw_angle_annotations(self, obj):
points = obj.data.splines[0].points
region = bpy.context.region
region_3d = bpy.context.area.spaces.active.region_3d
area = tool.Blender.get_viewport_context()['area']
region_3d = area.spaces.active.region_3d
points_chunked = [points[i : i + 3] for i in range(len(points) - 2)]
for points_chunk in points_chunked: