Salome HOME
Porting ParaVis presentations to ParaView-5.0.0 : set correct value of the Lock(Data...
[modules/paravis.git] / src / Macro / modes.py
index 731f6aeac2de2d43c312dedee19884c87543378d..71bce70a152a2bd4ffafdf33ac743815faccc316 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+# Copyright (C) 2010-2015  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-#
-# Do not touch this anchor comment
-#
-
 try: paraview.simple
 except: from paraview.simple import *
 paraview.simple._DisableFirstRenderCameraReset()
@@ -85,7 +81,9 @@ else :
   TimeAnimationCue1 = GetTimeTrack()
   TimeAnimationCue1.Enabled = 0
 
-  KeyFrameAnimationCue1 = GetAnimationTrack( ScaleVector1.GetProperty('ScaleFactor'))
+  KeyFrameAnimationCue1 = KeyFrameAnimationCue()
+  KeyFrameAnimationCue1.AnimatedProxy = ScaleVector1
+  KeyFrameAnimationCue1.AnimatedPropertyName = "ScaleFactor"
   KeyFrame0 = CompositeKeyFrame( KeyValues=[1.0], Interpolation='Sinusoid' )
   KeyFrame1 = CompositeKeyFrame( KeyTime=1.000000001, KeyValues=[1.0] )
 
@@ -94,6 +92,8 @@ else :
   AnimationScene1.Cues.append(KeyFrameAnimationCue1)
   AnimationScene1.Loop = 1
   AnimationScene1.PlayMode = 'Sequence'
+  AnimationScene1.StartTime = 0
+  AnimationScene1.EndTime = 1
   AnimationScene1.NumberOfFrames = 21
   
   WarpByVectorDataRepresentation = Show(WarpByVector1)
@@ -101,5 +101,6 @@ else :
     pvLookupTable = GetLookupTableForArray( rootname, 3, VectorMode='Magnitude' )
     WarpByVectorDataRepresentation.ColorArrayName = rootname
     WarpByVectorDataRepresentation.LookupTable = pvLookupTable
-  
+    WarpByVectorDataRepresentation.RescaleTransferFunctionToDataRange(True)
+
   AnimationScene1.Play()