void trackFilter_AddTrackItem(string name, Object trackUserObject) { if (movementSequence != null) { MovementSequenceState state = new MovementSequenceState(); state.captureState(); state.StartTime = timelineView.MarkerTime; movementSequence.addState(state); addStateToTimeline(state); } }
public void addKeyFramesToSequence(MovementSequence movementSequence, MovementSequenceEditor editor, float markerTime, float totalDuration) { foreach (MovementSequenceState copiedAction in copiedActions) { copiedAction.StartTime = copiedAction.StartTime - startTimeZeroOffset + markerTime; if (copiedAction.StartTime > totalDuration) { copiedAction.StartTime = totalDuration; } movementSequence.addState(copiedAction); editor.addStateToTimeline(copiedAction); } }
void MedicalController_OnLoopUpdate(Clock time) { if (lastFrameRecordTime >= frequencyMicro) { MovementSequenceState state = new MovementSequenceState(); state.captureState(); state.StartTime = Clock.MicrosecondsToSeconds(totalTimeMicro); recordingSequence.addState(state); lastFrameRecordTime = 0; } else { lastFrameRecordTime += time.DeltaTimeMicro; } totalTimeMicro += time.DeltaTimeMicro; recordingSequence.Duration = Clock.MicrosecondsToSeconds(totalTimeMicro); }