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

No comments:

Post a Comment

I recommend using Blender.StackExchange.com for python scripting questions. I will no longer be answering questions on this blog.