Scripts: syncregion.py
| File syncregion.py, 401 bytes (added by , 10 years ago) |
|---|
| Line | |
|---|---|
| 1 | # Make all volumes update their region to follow the active volume. |
| 2 | |
| 3 | from VolumeViewer import volume_list, active_volume |
| 4 | def volume_changed(v, type): |
| 5 | if type == 'region changed' and v == active_volume(): |
| 6 | for v2 in volume_list(): |
| 7 | if v2 != v: |
| 8 | v2.new_region(*v.region, adjust_step = False) |
| 9 | |
| 10 | for v in volume_list(): |
| 11 | v.add_volume_change_callback(volume_changed) |
![[Chimera Issue Tracking System]](/trac/chimera/chrome/site/chimera_logo.png)