Added method for saving current value of a property while recording

This commit is contained in:
Gene Payne
2021-03-22 12:21:32 -06:00
parent 6a6af1af9e
commit d060780f99
3 changed files with 27 additions and 0 deletions

View File

@@ -420,6 +420,18 @@ public:
void saveScriptKeyframeAscii(Timestamps& times,
datamessagestructures::ScriptMessage& sm, std::ofstream& file);
/**
* Since session recordings only record changes, the initial conditions aren't
* preserved when a playback starts. This function is called whenever a property
* value is set and a recording is in progress. Before the set happens, this
* function will read the current value of the property and store it so that when
* the recording is finished, the initial state will be added as a set property
* command at the beginning of the recording file, to be applied when playback
* starts.
*
* \param prop The property being set
*/
void savePropertyBaseline(properties::Property& prop);
/**
* Reads header information from a session recording file
*
@@ -658,6 +670,7 @@ protected:
std::vector<datamessagestructures::TimeKeyframe> _keyframesTime;
std::vector<std::string> _keyframesScript;
std::vector<timelineEntry> _timeline;
std::vector<std::string> _keyframesSavePropertiesBaseline;
unsigned int _idxTimeline_nonCamera = 0;
unsigned int _idxTime = 0;