MCPcopy Create free account
hub / github.com/Robbyant/lingbot-map / save

Method save

demo_render/rgbd_render/camera.py:232–249  ·  view source on GitHub ↗

Save to JSON.

(self, path: str)

Source from the content-addressed store, hash-verified

230 return self.get_camera(idx)
231
232 def save(self, path: str):
233 """Save to JSON."""
234 data = {
235 'total_frames': self.total_frames,
236 'interpolation': self.interpolation,
237 'keyframes': [
238 {
239 'frame': kf['frame'],
240 'eye': kf['eye'].tolist(),
241 'center': kf['center'].tolist(),
242 'up': kf['up'].tolist(),
243 'fov': kf['fov'],
244 }
245 for kf in self.keyframes
246 ],
247 }
248 with open(path, 'w') as f:
249 json.dump(data, f, indent=2)
250
251 @classmethod
252 def load(cls, path: str) -> 'CameraPath':

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected