Python Generator - Accessing Contour Spline
-
Hi all.
I'd like to be able to have a python generator that creates a field object with a custom preset for it's contour spline for remapping
I've used
[c4d.FIELD_CONTOUR_MODE] = 4
to set the Contour Mode to Curve.I also have
[c4d.FIELD_CONTOUR_SPLINE]
for accessing the contour spline, I'm just not sure how I can go about setting it to a preset. Any help is massively appreciated.Many thanks,
Jamie
www.moGRR.co.uk -
I don't know if you can apply a spline preset using code, but the parameter
c4d.FIELD_CONTOUR_SPLINE
stores a SplineData object, which you can edit as you like. -
Thanks again @PluginStudent for helping me so quickly.
That was enough information to help me find the .MakeUserSpline function that allows me to do exactly what I'm after:
MakeUserSpline('sin(x * PI)', 5)
More info here for anyone looking.
Cheers,
Jamie