This is the animation curve base class. Belongs to a CTrack that contain CKeys.
Get a writeable key by index.
Parameters: | 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 found==None: return
key = found["key"] #The found key
index = found["idx"] #The index of the found key
Parameters: |
|
||||||
---|---|---|---|---|---|---|---|
Return type: |
dict{key: CKey, int: int} |
||||||
Returns: |
Dict with the found key and index, or None. |
Find a writable key by time:
added = curve.AddKey(time)
if added==None: return
key = found["key"] #The found key
index = found["nidx"] #The index of the found key
Parameters: | time (BaseTime) – The time to add the key at. |
---|---|
Return type: | dict{key: CKey, int: int} |
Returns: | Dict with the found key and index, or None. |
Insert a key into this curve.
Parameters: | ckey (CKey) – The key to insert. |
---|---|
Return type: | bool |
Returns: | True if successful, otherwise False. |
Delete a key from this curve.
Parameters: | 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. |
Remove all keys from this curve.
Private. Should not be used.
Set keys to dirty. Equivalent to SetDirty(DIRTY_CHILDREN).
Get the track of this curve.
Return type: | CTrack |
---|---|
Returns: | The track of this curve. |
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: |
|
---|