mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-21 01:59:15 -05:00
Added command to save current delta time when recording starts.
This commit is contained in:
@@ -168,8 +168,15 @@ bool SessionRecording::startRecording(const std::string& filename) {
|
||||
}
|
||||
_recordFile << '\n';
|
||||
|
||||
//Record the current delta time so this is preserved in recording
|
||||
double currentDeltaTime = global::timeManager.deltaTime();
|
||||
std::string scriptCommandForInitializingDeltaTime = "openspace.time.setDeltaTime(";
|
||||
scriptCommandForInitializingDeltaTime << currentDeltaTime << ");";
|
||||
saveScriptKeyframe(scriptCommandForInitializingDeltaTime);
|
||||
|
||||
LINFO("Session recording started");
|
||||
_timestampRecordStarted = global::windowDelegate.applicationTime();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user