| | 3 | |
| | 4 | Need to identify all the possible state parameters that can be changed between two states. All of those parameters need to be retained, probably in some form of immutable data type (tuple) within a dictionary for easy access to several parameter groups (viewer, volumes, surfaces, models, labels, etc.). Some of the elements in a state may have shared spatial parameters (e.g., molecular surfaces, molecules, and atoms may share a common spatial transform). |
| | 5 | |
| | 6 | The savepos/reset functionality works with a tuple: |
| | 7 | {{{ |
| | 8 | # |
| | 9 | # savepos returns a tuple of various parameters (my comments added) |
| | 10 | # |
| | 11 | return ( |
| | 12 | chimera.viewer.scaleFactor, #cam |
| | 13 | chimera.viewer.viewSize, #cam |
| | 14 | cam.center, #cam |
| | 15 | cam.nearFar, #cam |
| | 16 | cam.focal, #cam |
| | 17 | xforms, # spatial/geometry |
| | 18 | clips, # per-model clipping |
| | 19 | chimera.openModels.cofrMethod, # spatial/geometry |
| | 20 | cofr, # spatial/geometry |
| | 21 | chimera.viewer.clipping #cam |
| | 22 | ) |
| | 23 | }}} |
| | 24 | |