I think I've fixed it
def main():
global Output1, Output2, Output3, Output4
if pos == 4:
Output1 = 0
Output2 = 0.5 + twist
Output3 = 1
Output4 = 0.5
if pos == 5:
Output1 = 0
Output2 = 0.5
Output3 = 1
Output4 = 0.5 + twist
import c4d
from c4d import utils
#Welcome to the world of Python
def main():
global Output1
if not SplineObj:
return
blah = utils.SplineLengthData() # blah = dummy var
blah.Init(SplineObj) # name of spline
Output1 = blah.GetLength()
arrowTool_0001.c4d
I'm not too sure about this line ' sld->Free(); ' let me know if it works ok
edit - according to lesterbanks, the line I was unsure about would be
blah.Free() # free up memory used by new spline class instance
might be required...