268 {
271
272 CTSaveStructure saveData = new CTSaveStructure();
276
277 foreach (CTKeyframe keyframe :
m_Cameras)
278 {
279 Param6<vector, vector, float, float, float, int> transform = new Param6<vector, vector, float, float, float, int>(
280 keyframe.GetPosition(),
281 keyframe.GetOrientation(),
282 keyframe.GetInterpTime(),
283 keyframe.GetFOV(),
284 keyframe.GetDOF(),
285 keyframe.GetPin(),
286 );
288 }
289
290 foreach (CTEvent eventEntry :
m_Events)
291 {
292 Param4<int, int, float, bool> ev = new Param4<int, int, float, bool>(
293 eventEntry.GetEventActor(),
294 eventEntry.GetEventType(),
295 eventEntry.GetEventTime(),
296 eventEntry.GetEventWalk(),
297 );
299 }
300
301 foreach (CTActor actorEntry :
m_Actors)
302 {
303 Param5<vector, vector, string, ref array<string>, string> ac = new Param5<vector, vector, string, ref array<string>, string>(
304 actorEntry.GetPosition(),
305 actorEntry.GetRotation(),
306 actorEntry.GetActorType(),
307 actorEntry.GetItems(),
308 actorEntry.GetHandsItem(),
309 );
311 }
312
313 string errorMessage;
314 if (!JsonFileLoader<ref CTSaveStructure>.SaveFile(
m_CameraToolsDataPath +
"/keyframe_data.json", saveData, errorMessage))
316 }
ref array< ref Param6< vector, vector, float, float, float, int > > m_Cameras
ref array< ref Param5< vector, vector, string, ref array< string >, string > > m_Actors
ref array< ref Param4< int, int, float, bool > > m_Events
proto native bool MakeDirectory(string name)
Makes a directory.
proto bool FileExist(string name)
Check existence of file.