Opened 5 years ago

Last modified 5 years ago

#3368 assigned enhancement

API needed for saving non-State classes

Reported by: Tom Goddard Owned by: Tom Goddard
Priority: moderate Milestone:
Component: Core Version:
Keywords: Cc: Greg Couch, pett
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Currently geometry.Place and graphics.Drawing, graphics.View, ... do not have the session saving base class State since those modules are intended to be useful beyond ChimeraX. Instead they define methods for saving their session state. But those methods are hardcoded into core/session.py in the Session.snapshot_methods() routine. An API is needed for geometry and graphics and other bundles to register how classes are saved in sessions when the do not have a State base class.

Currently bundles tell session saving about how to find the classes they save in session from their class names using the BundleAPI.get_classes() method. Possibly the new API should also be part of BundleAPI.

Change History (1)

comment:1 by Tom Goddard, 5 years ago

Summary: API needed saving non-State classesAPI needed for saving non-State classes
Note: See TracTickets for help on using tickets.