|
Notes |
|
|
(0021125)
|
|
Utkarsh Ayachit
|
|
2010-06-22 15:13
|
|
commit 76abe353579e6776f17ecd1f08ada64156f72000
Author: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
Date: Mon Jun 21 22:36:40 2010 -0400
Fixed BUG 0009470. Better support for animation in python.
* Added API to access the active AnimationScene.
* Ensured that a valid animation scene is created when a new connection is made
in pvpython. Also ensureing that the Views and TimeKeeper properties on the
animation scene and updated correctly.
* Added new "Name" property to Property class to allow access to the name of a
property.
* Added API to access/create animation tracks. |
|
|
|
(0021126)
|
|
Utkarsh Ayachit
|
|
2010-06-22 15:14
|
|
Note that the new API has been added as indicated on the wiki:
http://www.paraview.org/Wiki/ParaView/Python_Scripting#Animating [^]
Old API will work, but those animation scenes/tracks won't be seen by the GUI.
---------------------------------
Sample new-style script:
---------------------------------
from paraview.simple import *
Sphere()
Show()
Render()
# Get the application-wide animation scene
scene = GetAnimationScene()
# Get the animation track for animating "StartTheta" on the active source.
# GetAnimationTrack() creates a new track if none exists.
cue = GetAnimationTrack("StartTheta")
# Create 2 keyframes for the StartTheta track
keyf0 = CompositeKeyFrame()
keyf0.Interpolation = 'Ramp'
# At time = 0, value = 0
keyf0.KeyTime = 0
keyf0.KeyValues= [0]
keyf1 = CompositeKeyFrame()
# At time = 1.0, value = 200
keyf1.KeyTime = 1.0
keyf1.KeyValues= [200]
# Add keyframes.
cue.KeyFrames = [keyf0, keyf1]
scene.Play() |
|
|
|
(0021127)
|
|
Utkarsh Ayachit
|
|
2010-06-22 15:14
|
|
|
Needs to move to "release" branch |
|
|
|
(0021288)
|
|
Utkarsh Ayachit
|
|
2010-07-07 16:44
|
|
|
Moved to "release" branch and verified it works on "release" branch |
|
|
|
(0021370)
|
|
Alan Scott
|
|
2010-07-12 21:26
|
|
|