August 24, 2012

Determine length of Curve in Blender

First i will do a mathless version using a convoluted, yet pretty fast, way to get at the global length of a curve.

This might be a little excessive, but here is a small script that you run from text editor, then in 3dview a button appears when you select a curve.

When pressed:
- it duplicates the curve as a mesh,
- applies all transforms to the duplicate (for global coordinate values)
- sums the collected the edges of this mesh
- prints the length to the terminal + copies value to clipboard
- then deletes duplicate mesh
- selects original curve again

1 comment:

Please use for python scripting questions unrelated to this post.