for finding the length of a path, i am trying to use the ‘getPathLen’ method of the ‘Curve Data’ class. i was trying
import Blender
from Blender import Curve
cur = getCurveLen('Curve1')
print cur
Curve1 is the name of the curve i want to find the length of.
can anyone tell me why this isnt working?
(the print part is just for me to see the length)
Seems like there’s a few problems here…
The function name on the API documentation is getPathlen() but you’ve written getCurveLen()…
…However it seems there is a typo in the documentation as the correct method name is getPathLen()
This works:
import Blender
from Blender import Object
cur = Object.Get('Curve')
curdata = cur.getData()
print dir(curdata) # Which tells us that Pathlen should be PathLen
l = curdata.getPathLen()
print l # Success!