Proposed Session Restore API Change
Current restore methods:
- restore_snapshot_new() - allocates memory for objects without calling __init__()
- restore_snapshot_init() - initializes new object, equivalent to __init__() but using session data.
Proposed restore methods:
- restore_snapshot() - creates object and sets its state. Class method.
- set_state_from_snapshot() - sets state of an existing object saved in session.
I've tried this new API on current ChimeraX, replacing all session restore code.
Encountered no problems.
I think we should try at least prototype scene saving using session API before
we freeze our session APIs. I plan on trying the set_state_from_snapshop() method
to restore scenes.