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 the animation curve base class. Belongs to a CTrack that contain CKeys.
BaseList2D
Get a writeable key by index.
| Parameter: | index (int) – Key index, 0 <= index < GetKeyCount(). |
|---|---|
| Raises IndexError: | |
| Raise if key index is out of range. | |
| Return type: | CKey |
| Returns: | The key found, or None. |
Find a writable key by time:
found = curve.FindKey(time)
if not found:
return
key = found["key"] #The found key, c4d.CKey
index = found["idx"] #The index of the found key, int
| Parameters: |
|
||||||
|---|---|---|---|---|---|---|---|
| Return type: | dict |
||||||
| Returns: | Dict with the found key and index, or None. |
Find a writable key by time:
added = curve.AddKey(time)
if not added:
return
key = found["key"] #The found key, c4d.CKey
index = found["nidx"] #The index of the found key, int
| Parameter: | time (BaseTime) – The time to add the key at. |
|---|---|
| Return type: | dict |
| Returns: | Dict with the found key and index, or None. |
Insert a key into this curve.
| Parameter: | ckey (CKey) – The key to insert. |
|---|---|
| Return type: | bool |
| Returns: | True if successful, otherwise False. |
Delete a key from this curve.
| Parameter: | index (int) – The index of the key to delete, 0 <= index < GetKeyCount(). |
|---|---|
| Raises IndexError: | |
| Raise if key index is out of range. | |
| Return type: | bool |
| Returns: | True if successful, otherwise False. |
Move a key in the curve.
| Parameters: |
|
|---|---|
| Raises IndexError: | |
Raise if key index is out of range. |
|
| Return type: | int |
| Returns: | The new index. |
Get the value calculated at time, taking into account things like timecurves.
| Parameters: |
|
|---|---|
| Return type: | float |
| Returns: | The calculated value. |
Set the defaults for key kidx for the curve. This includes lock, mute, clamp, break, auto properties, interpolation and tangents. This way you can set up a value and complete the missing properties with the defaults.
| Parameters: |
|
|---|