(status: dict)
| 101 | return status |
| 102 | |
| 103 | def deserialize(status: dict): |
| 104 | |
| 105 | if not len(status.get('ids')): |
| 106 | return |
| 107 | |
| 108 | deser_om.PruneUnusedBlobs() |
| 109 | |
| 110 | for object_id in status.get('ids'): |
| 111 | new_mtime = status.get('mtimes').get(object_id) |
| 112 | last_mtime = last_mtimes.get(object_id) |
| 113 | if last_mtime is not None and new_mtime is not None: |
| 114 | if last_mtime < new_mtime: |
| 115 | deser_om.UnRegisterState(object_id) |
| 116 | deser_om.RegisterState(ser_om.GetState(object_id)) |
| 117 | elif last_mtime is None: |
| 118 | deser_om.RegisterState(ser_om.GetState(object_id)) |
| 119 | last_mtimes.update({object_id: new_mtime}) |
| 120 | for hash_text, blob in status.get('hashes').items(): |
| 121 | deser_om.RegisterBlob(hash_text, blob) |
| 122 | |
| 123 | deser_om.UpdateObjectsFromStates() |
| 124 | |
| 125 | renderWindow = deser_om.GetObjectAtId(id_rwi).GetRenderWindow() |
| 126 | renderWindow.SetPosition(400, 1) |
| 127 | renderWindow.Render() |
| 128 | |
| 129 | id_rwi = ser_om.RegisterObject(interactor) |
| 130 |
nothing calls this directly
no test coverage detected