Changes between Version 7 and Version 8 of Examples/ParaviewAnimating


Ignore:
Timestamp:
06/14/18 15:43:44 (6 years ago)
Author:
Herwig Zilken
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Examples/ParaviewAnimating

    v7 v8  
    8787}}}
    8888
     89== Key Frames ==
     90Before 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.
     91Without 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
     93The two basic keyframe classes are:
     94* paraview.simple.!KeyFrame
     95* paraview.simple.!BooleanKeyFrame
     96These two keyframes have only two intersting properties: !KeyTime and !KeyValues (which is a Python-list of values).
     97
     98The 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
     104The keyframe for interpolating camera parameters is:
     105* paraview.simple.!CameraKeyFrame
     106
    89107== !KeyFrameAnimationCue ==
    90108As already mentioned, a !KeyFrameAnimationCue connects the property of a pipeline object to the cue.
    91109This connection is defined via the attributes !AnimatedProxy (proxy of the pipeline object) and !AnimatedPropertyName (name of the connected property), though typically you do not have to set these attributes on your own. Instead they are set when constructing a !KeyFrameAnimationCue by calling !GetAnimationTrack(...) (see use case below).
    92 Similar to the !AnimationScene, every cue also has the properties !StartTime and !EndTime. Typically these properties do not have the same values as the corresponding ones of !AnimationScene. When !TimeMode is set to 'Normalize', the start and end time of the animation scene is linearly interpolated to the interval ![0,1]. But don't care, these values are the default ones anyhow.
     110Similar to the !AnimationScene, every cue also has the properties !StartTime and !EndTime. Typically these properties do not have the identical values as the corresponding ones of !AnimationScene. When !TimeMode is set to 'Normalize', the start and end time of the animation scene is linearly interpolated to the interval ![0,1]. But don't care, these values are the default anyhow.
    93111
    94112=== !KeyFrameAnimationCue Use Case ===
     
    105123
    106124
     125== !TimeAnimationCue ==
     126This 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.
     127But 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 ===
     130Whatever the AnimationScene clock time is, set the time of the timetrack to 100.
     131This setup can be useful e.g. to generate an animated camera flight from one single data timestep (100 in this example).
     132{{{
     133#!python
     134from paraview.simple import *
     135timeTrack = GetTimeTrack()
     136timeTrack.StartTime = 0
     137timeTrack.EndTime = 1
     138timeTrack.UseAnimationTime = 0
     139keyFrame = CompositeKeyFrame()
     140keyFrame.Interpolation = "Ramp"
     141keyFrame.KeyValues=[100] # set time step to 100
     142keyFrame.KeyTime = 0
     143timeTrack.KeyFrames=[keyFrame]
     144}}}
     145
     146Reset the time track to use the AnimationScene clock time again:
     147{{{
     148#!python
     149timeTrack.UseAnimationTime = 1
     150}}}
     151
     152== !CameraAnimationCue ==
     153To be done
     154
     155== !PythonAnimationCue ==
     156To be done
     157