On 05/10/2015 at 13:06, xxxxxxxx wrote:
I have an Alembic object that has animation on it. I don't want to adjust that.
I want to be able to keyframe the "Start of Animation" option that's in the Object tab.
I can add a track, get the curve, and add a key with no errors popping up, I just can't get the value to go to anything else beside "1 F"
I think my issue is that the CKey.SetValue requires a curve and a float and the end result needs to be a baseTime object.
Here's a snippet of the code I have currently.
doc = c4d.documents.GetActiveDocument() sel = doc.GetActiveObject() startFrame = 200 track = c4d.CTrack( sel, c4d.DescID( c4d.ALEMBIC_START_DELAY )) sel.InsertTrackSorted( track ) curve = track.GetCurve() fKey = c4d.CKey() track.FillKey( doc, sel, fKey ) fKey.SetTime( curve, c4d.BaseTime( startFrame, fps)) fKey.SetValue( curve, startFrame ) curve.InsertKey( fKey ) c4d.EventAdd()
This code doesn't generate errors, it just doesn't add the new value of 200.
What am I missing or doing wrong?