Exemple #1
0
 def take_snapshot(self, session, flags):
     from chimerax.graphics.gsession import DrawingState
     data = {
         'model state': Surface.take_snapshot(self, session, flags),
         'drawing state': DrawingState().take_snapshot(self, session, flags),
         'version': GENERIC3D_STATE_VERSION,
     }
     return data
Exemple #2
0
 def restore_snapshot(cls, session, data):
     m = cls('name', session)
     m.set_state_from_snapshot(session, data['model state'])
     from chimerax.graphics.gsession import DrawingState
     DrawingState().set_state_from_snapshot(m, session, data['drawing state'])
     return m