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
This is a very simple to use class for splines. Also check out a helper class in the c4d.utils module called SplineHelp.
PointObject
| Parameters: |
|
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Return type: | SplineObject |
||||||||||
| Returns: | The new object. |
Get the type of spline.
| Return type: | int |
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Returns: | The type of spline. Check out Spline Type.
|
Checks if spline is closed.
| Return type: | bool |
|---|---|
| Returns: | Returns True if the spline is closed. |
Get the spline point at a position along the given segment.
| Parameters: |
|
|---|---|
| Return type: | |
| Returns: | The spline point |
Get the spline tangent at a position along the given segment.
| Parameters: |
|
|---|---|
| Return type: | |
| Returns: | The spline point |
Returns information about the segment.
Note
0 <= id < GetSegmentCount.
Example:
segment = spline.GetSegment(0)
print segment["cnt"], segment["closed"] #is int, bool
| Parameter: | id (int) – The segment. |
|---|---|
| Raises IndexError: | |
| Raise if segment index is out of range. | |
| Return type: | dict |
| Returns: | The segment. |
Set properties of the segment.
| Parameters: |
|
|---|---|
| Raises IndexError: | |
Raise if segment index is out of range. |
|
Returns the count of segments.
| Return type: | int |
|---|---|
| Returns: | The count. |
Change the number of segments and points for this spline. If scnt is -1 or not set, the method of PointObject.ResizeObject is used.
| Parameters: |
|
|---|---|
| Return type: | bool |
| Returns: | Success of changing the number of points and segments. |
Initialise the spline with default coefficients.
| Return type: | bool |
|---|---|
| Returns: | True if successful, otherwise False. |
Returns the count of tangents.
| Return type: | int |
|---|---|
| Returns: | The count. |