| 89 | == Key Frames == |
| 90 | Before we start our explantion of cues, we give an overview about keyframes, as keyframes are an integral part of cues. Keyframes define what value(s) a cue has at a give point in time. |
| 91 | Without keyframes, a cue is more or less useless (with the exception of the !TimeAnimationCue, see below). A cue stores the list of attached keyframes in its KeyFrame property. |
| 92 | |
| 93 | The two basic keyframe classes are: |
| 94 | * paraview.simple.!KeyFrame |
| 95 | * paraview.simple.!BooleanKeyFrame |
| 96 | These two keyframes have only two intersting properties: !KeyTime and !KeyValues (which is a Python-list of values). |
| 97 | |
| 98 | The keyframes used to interpolate values are: |
| 99 | * paraview.simple.!RampKeyFrame: linear interpolation |
| 100 | * paraview.simple.!SinusoidKeyFrame: sinusoidal interpolation |
| 101 | * paraview.simple.!ExponentialKeyFrame: exponential interpolation |
| 102 | * paraview.simple.!CompositeKeyFrame: composite of four types of keyframes. 'Interpolation' property can be set to 'Boolean', 'Ramp', 'Exponential', or 'Sinusoid' |
| 103 | |
| 104 | The keyframe for interpolating camera parameters is: |
| 105 | * paraview.simple.!CameraKeyFrame |
| 106 | |
| 125 | == !TimeAnimationCue == |
| 126 | This type of cue is a very special one: while all other kind of cues are absolutely useless without attached keyframes, this one can fullfill a special task without having any: it can directly hand over the animation clock time (coming from !AnimationScene) to the property of a connected object. The typical use case within !ParaView is as follows: the !AnimationScene sets the value of the !TimeAnimationCue directly to its clock time. The !TimeAnimationCue is connected to the Time property of the !TimeKeeper object, which in turn requests all data objects to load the correct time step of the data. This way the clock time of the animation scene can be kept in sync with the data timsteps. |
| 127 | But one can override this behaviour by attaching keyframes to this cue and setting "!UseAnimationTime" to 0. This way one can control what data timesteps are loaded/rendered at what animation clock time. |
| 128 | |
| 129 | === !TimeAnimationCue Use Cases === |
| 130 | Whatever the AnimationScene clock time is, set the time of the timetrack to 100. |
| 131 | This setup can be useful e.g. to generate an animated camera flight from one single data timestep (100 in this example). |
| 132 | {{{ |
| 133 | #!python |
| 134 | from paraview.simple import * |
| 135 | timeTrack = GetTimeTrack() |
| 136 | timeTrack.StartTime = 0 |
| 137 | timeTrack.EndTime = 1 |
| 138 | timeTrack.UseAnimationTime = 0 |
| 139 | keyFrame = CompositeKeyFrame() |
| 140 | keyFrame.Interpolation = "Ramp" |
| 141 | keyFrame.KeyValues=[100] # set time step to 100 |
| 142 | keyFrame.KeyTime = 0 |
| 143 | timeTrack.KeyFrames=[keyFrame] |
| 144 | }}} |
| 145 | |
| 146 | Reset the time track to use the AnimationScene clock time again: |
| 147 | {{{ |
| 148 | #!python |
| 149 | timeTrack.UseAnimationTime = 1 |
| 150 | }}} |
| 151 | |
| 152 | == !CameraAnimationCue == |
| 153 | To be done |
| 154 | |
| 155 | == !PythonAnimationCue == |
| 156 | To be done |
| 157 | |