Chimera version 1.7 (November 5, 2012)
The Animate package implements both scene and animation functionality. Core attributes such as model names, residue types and atom positions are handled automatically by the Animate package. Tools are responsible for saving, restoring and animating objects and attributes that they introduce. Notification of scene and animation events happen through the standard Chimera trigger mechanism.
There are two triggers associated with scenes:
Each scene object has a dictionary,
for managing tool-specific data. Tools are responsible for creating
their own keys and values for storing and accessing data in the
dictionary. Singleton tools such as 2DLabels
can use fixed strings such as "2D Labels (gui)" as their
keys; multi-instance tools will need to come up with unique keys and
make sure that they are not overwriting data for some other tool.
Typically, data is saved in
SCENE_TOOL_SAVE and accessed
Animate updates the graphics display during
transitions. There are three types of transitions:
framesattribute of the key frame). There is a static "transition" for the initial frame if it has a non-zero
There are four triggers associated with key frame and scene transitions:
ANIMATION_TRANSITION_FINISH. The purpose for firing this trigger is to simplify writing tools that do not need step-by-step animation yet want to restore state when a scene state is reached. These tools can just register for the
SCENE_TOOL_RESTOREtrigger and completely ignore the
ANIMATION_TRANSITION_*triggers. Tools that wants to handle both step-by-step animation and scene restoration will need to avoid getting the
SCENE_TOOL_RESTOREtrigger twice by deregistering for it in
ANIMATION_TRANSITION_STARTand reregistering for it in
The transition object received by handlers has several useful attributes and methods:
ANIMATION_TRANSITION_START, this value should always be zero. For
ANIMATION_TRANSTION_STEP, this value ranges from 1 to
frames, inclusive. For
ANIMATION_TRANSITION_FINISH, this value should be the same as
Animate.Keyframe.Keyframefor movie playback or
Animate.Scene.Scenefor scene restoration using the default transition.
tool_settingsin transition objects are transient. When a transition completes, the dictionary is automatically removed and any stored data will be lost.