THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/04/2011 at 10:22, xxxxxxxx wrote:
Hi,
I'm testing the SplineHelper class functions. But for some reason GetSegmentCount() always returns the value of one. Even though my spline has multiple segments.
Any idea what I'm doing wrong here?:
import c4d
from c4d import gui
def main() :
sh = c4d.utils.SplineHelp()
sh.InitSpline(op, rail=None, target_rail=True, use_deformed_points=True, force_update=True, use_global_space=True)
segCount = sh.GetSegmentCount()#Counts the total number of segments
segLength = sh.GetSegmentLength(0)#Gets the length of the first segment
totalLenght = sh.GetSplineLength()#Gets the length of the entire spline
print segCount
print segLength
print totalLenght
if __name__=='__main__':
main()
-ScottA