Featured post

new redirect for blender.org bpy docs.

http://www.blender.org/api/blender_python_api_current/ As of 10/11 november 2015 we can now link to the current api docs and not be worr...

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 Blender.StackExchange.com for python scripting questions unrelated to this post.