This is going to be a large PR - it refactors the viewers to use State classes, which I'll describe shortly in the documentation. The short version is that there are now classes that hold the 'state' of a viewer and are shared by all widgets that need it, simplifying the set-up significantly. This should result in a net reduction of lines of code and very simplified logic once completed.
Things that don't work or can be optimized:
[x] Clipping of scatter data is broken
[x] Aspect property of base state class could be optimized/cached
[x] Make saving/loading sessions work again
[x] Make session data backward-compatible
[x] Refactor isosurface code
[x] Refactor State limits helper to be more generic and allow multiple values to be computed
[x] Serialize limits_cache to recover any custom limits set by the user
[x] Add old session file to test suite to make sure it always works, and add a version 1 file too
This is going to be a large PR - it refactors the viewers to use State classes, which I'll describe shortly in the documentation. The short version is that there are now classes that hold the 'state' of a viewer and are shared by all widgets that need it, simplifying the set-up significantly. This should result in a net reduction of lines of code and very simplified logic once completed.
Things that don't work or can be optimized: