Evaluating a position along a curve

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
OEP
Posts: 0
Joined: Sat May 18, 2013 12:47 pm

Evaluating a position along a curve

Post by OEP »

Is there some library code available for evaluating a position along a curve given a t parameter, preferably agnostic of what type of curve it is? I think I could write something myself but I'd like to save some time. :)

I need a convenient way to for the user to specify several points along a path, and it looks like I could use the curve editor in Blender as the interface for this, though I would welcome other suggestions.

Thanks!

CoDEmanX
Posts: 0
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Post by CoDEmanX »

there is an evaluate() function for F-Curves, but not for Curves. You could look at the C-code how evalute() is programmed and try to re-create that. Or have a look at the Animation Trail addon, it lets you adjust animations by using a bezier-like curve, and there are movable handles on it.
I'm sitting, waiting, wishing, building Blender in superstition...

OEP
Posts: 0
Joined: Sat May 18, 2013 12:47 pm

Post by OEP »

Thanks for the reply -- I'll probably start with Bezier curves and if it's requested move on to other types of curves.

Post Reply