Changes between Version 5 and Version 6 of Examples/ParaviewAnimating
- Timestamp:
- 06/14/18 13:09:33 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Examples/ParaviewAnimating
v5 v6 40 40 * !PlayMode: either 'Sequence', 'Snap To !TimeSteps' or '!RealTime' 41 41 * !NumberOfFrames: number of frames, only used when !PlayMode is set to 'Sequence' 42 * Duration: duration of the animation in seconds, only used when !PlayMode is set to '!RealTime' 42 43 * !AnimationTime: the actual animation clock time. Can be get or set. 43 44 * !TimeKeeper: the !TimeKeeper-object 45 * Cues: List of attached cues (=tracks) 44 46 45 47 Important methods of !AnimationScene: … … 48 50 * !GoToNext(): goto next frame 49 51 * !GoToPrevious(): goto previous frame 52 * Play(): renders all timesteps one after another in a window 53 * Stop(): stops the rendering 50 54 51 === Use Case===55 === !AnimationScene Use Cases === 52 56 Get the animation scene and play a sequence of 100 timesteps: 53 57 {{{ 54 58 #!python 59 from paraview.simple import * 55 60 animationScene = GetAnimationScene() 56 61 animationScene.StartTime = 0 … … 70 75 {{{ 71 76 #!python 77 from paraview.simple import * 72 78 animationScene = GetAnimationScene() 73 79 animationScene.PlayMode = 'Snap To TimeSteps' … … 81 87 }}} 82 88 89 == !KeyFrameAnimationCue == 90 As already mentioned, a !KeyFrameAnimationCue is connected to a property of a pipeline object. 91 This 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]. These values are the default ones. 93 94 === !KeyFrameAnimationCue Use Case === 95 Create three different animation cues for three different properties of a sphere: 96 {{{ 97 #!python 98 from paraview.simple import * 99 sphere = Sphere() 100 Show(sphere) 101 track3 = GetAnimationTrack("Visibility") # property of active source 102 track1 = GetAnimationTrack("Center", 0, sphere) 103 track2 = GetAnimationTrack(sphere.GetProperty("Radius")) 104 }}} 83 105 84 106 85