This documentation is for the free plugin Py4D in CINEMA 4D R11.5 and not for the C4DSDK of Python in CINEMA 4D R12. For R12, please visit PluginCafe.com

c4d.SplineData – a SplineData class

A datatype which contains information about spline curves. This type is called by value:

#op is a BaseList2D instance and contains a SplineData element at the given position [SPLINESETTINGS_ID]
#in this case you have to send the object back to apply the change.
sdata = op[SPLINESETTINGS_ID]
sdata.mirror()
op[SPLINESETTINGS_ID] = sdata
class c4d.SplineData

Methods

SplineData.__init__([v])
Parameter:v (SplineData) – Copy constructor.
Return type:SplineData
Returns:The new object or None, if allocation failed.
SplineData.SelectAll()
Selects all points.
SplineData.Flip()
Flips the spline.
SplineData.Mirror()
Mirrors the spline.
SplineData.SetRound(r)

Set the tension.

Parameter:r (float) – The tension
SplineData.GetRound()

Gets the tension.

Return type:float
Returns:Tension.
SplineData.Maximum()
Makes all Y coordinates less than or equal to 1.
SplineData.Minimum()
Makes all Y coordinates greater than or equal to 0.
SplineData.DeleteAllKnots()
Deletes all knots.
SplineData.DeleteKnot(a)

Deletes a knot.

Parameter:a (int) – The knot index to delete.
Return type:bool
Returns:True if successful, otherwise False.
SplineData.InsertKnot(x, y, flags=0)

Inserts a knot.

Parameters:
  • x (int) – X coordinate
  • y (int) – Y coordinate
  • flags (int) –
    SPLINE_KNOT_FLAG_NO_HORIZ_MOVE Don’t allow the knot to move horizontally.
    SPLINE_KNOT_FLAG_NO_VERT_MOVE Don’t allow the knot to move vertically.
Return type:

int

Returns:

Knot index.

SplineData.GetKnots()

Returns all knots in a list.

Return type:list of Vector
Returns:All positions in a list.
SplineData.GetPoint(r)

Gets a point from its X coordinate.

Parameter:r (float) – The x position
Return type:Vector
Returns:The position
SplineData.GetSelectedCount()

Returns the count of knots which are selected.

Return type:int
Returns:The count
SplineData.GetKnotCount()

Gets the knot count.

Return type:int
Returns:Knot count.
SplineData.GetRange()

Gets the range of the spline.

Return type:

dict

Returns:

The dict members.

xmin

float

xmax

float

xsteps

float

ymin

float

ymax

float

ysteps

float

SplineData.SortKnots()

Sort the knots.

Return type:int
Returns:The new index of the active knot.
SplineData.SetRange(xmin, xmax, xsteps, ymin, ymax, ysteps)

Set the range of the spline.

Parameters:
  • xmin (float) – The X min range.
  • ymax – The X max range.
  • xsteps (float) – The X steps.
  • ymin (float) – The Y min range.
  • ymax (float) – The Y max range.
  • ysteps (float) – The Y steps.

Table Of Contents

This Page