Fix #833 by adding correct number of edges

The mesh structure was invalid because the vertex indices for only one edge were set. The other edge had the same index for both vertices.
This commit is contained in:
Robert Gützkow
2020-06-06 23:42:24 +02:00
parent 793c1c8ec6
commit 7c7587f167
@@ -62,7 +62,7 @@ class Annotator:
obj.data.vertices.add(2)
obj.data.vertices[-2].co = co1
obj.data.vertices[-1].co = co2
obj.data.edges.add(2)
obj.data.edges.add(1)
obj.data.edges[-1].vertices = (obj.data.vertices[-2].index, obj.data.vertices[-1].index)
if isinstance(obj.data, bpy.types.Curve):
polyline = obj.data.splines.new('POLY')