public void addKeyFramesToSequence(OffsetModifierSequence sequence, OffsetSequenceEditor editor, float markerTime, float totalDuration) { foreach (var copiedAction in copiedActions) { copiedAction.BlendAmount = copiedAction.BlendAmount - startTimeZeroOffset + markerTime; if (copiedAction.BlendAmount > totalDuration) { copiedAction.BlendAmount = totalDuration; } sequence.addKeyframe(copiedAction); editor.addToTimeline(copiedAction); } sequence.sort(); }
void trackFilter_AddTrackItem(string name, Object trackUserObject) { if (offsetSequence != null) { OffsetModifierKeyframe keyframe = offsetSequence.createKeyframe(); if (Player != null) { keyframe.deriveOffsetFromFollower(Player.Follower); } keyframe.BlendAmount = timelineView.MarkerTime / Duration; offsetSequence.addKeyframe(keyframe); offsetSequence.sort(); addToTimeline(keyframe); } }