3
$\begingroup$

How can I access the measurements displayed with the Measure Tool in Blender 2.80 from Python? I'm not seeing it anywhere in the documentation, hoping I'm just blind. Thanks.

$\endgroup$

1 Answer 1

2
$\begingroup$

All credit for this answer goes to the discussion here.

The data is stored in the grease pencil annotations:

bpy.data.grease_pencils["Annotations"].layers['RulerData3D']

Specifically, to get a list of all length measurements currently in the scene:

lengths = list((s.points[0].co - s.points[-1].co).length for s in bpy.data.grease_pencils["Annotations"].layers['RulerData3D'].frames[0].strokes)
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .