mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 14:02:27 +00:00
Fixed #3412
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:
@@ -913,7 +913,8 @@ class SvgWriter:
|
|||||||
def draw_angle_annotations(self, obj):
|
def draw_angle_annotations(self, obj):
|
||||||
points = obj.data.splines[0].points
|
points = obj.data.splines[0].points
|
||||||
region = bpy.context.region
|
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)]
|
points_chunked = [points[i : i + 3] for i in range(len(points) - 2)]
|
||||||
|
|
||||||
for points_chunk in points_chunked:
|
for points_chunk in points_chunked:
|
||||||
|
|||||||
Reference in New Issue
Block a user