wiki:ChimeraAnimationTasks

Version 2 (modified by Darren Weber, 15 years ago) ( diff )

--

State Parameters and Transitions

Something like this gains access to a lot of view parameters:

for n in dir(chimera.viewer): print n, eval('type(chimera.viewer.%s)' % n)

Some tips in the programming FAQ are useful (esp, items 4, 5, 7-10). Note, take a look at the code for chimera.update.checkForChanges(), as this may be helpful in detecting changes for transitions and for checking the validity of state parameters.

chimera.OpenModels.addRemoveHandler(func, data) can be used to add a trigger handler when removing models. This might be useful in the creation of a state instance as a way to maintain integrity or validity of the saved state. It may depend on whether the state instance keeps a reference or a copy of models in the saved state. For efficiency, it is better to keep a reference. For validity, it could be better to keep a copy. Perhaps a copy is required only when a model is removed, so the copy action could be triggered then.

Note: See TracWiki for help on using the wiki.