I have two pvd-files defined over two separate intervals with some overlap. Is it possible for paraview to hide results for the file (and its dependent objects) which is outside its designated timeinterval?
file1.pvd (338 Bytes) file2.pvd (338 Bytes)
I then want file1.pvd to show only for times in the interval [1.0,4.0] (and correspondingly [3.0,6.0] for file2.pvd), and only show both files in the interval [3.0,4.0]).
The default in paraview seems to extend the values for file1.pvd at 4.0 untill 6.0, and correspondingly for file2.pvd at 3.0 down to 1.0.
Open up the animation view (
Animation View). From there, you can add a track for each object of their
Visibility property. Set the visibility to 1 to show the data at a particular time and 0 to hide the data. I recommend changing the
Thanks for your answer, it works! Now I need to script this in python, but the code does not appear when I use the “Start Trace” functionality (is this a bug?). I assume this has to be applied to all derived objects as well (which would even stress the importance of scripting further)?
Yup, that appears to be a bug. In fact, it’s already been reported: https://gitlab.kitware.com/paraview/paraview/-/issues/17395
You will have to apply this to all visible objects. So if you are applying a sequence of filters and just looking at the result, you just have to apply the tracks to the result. But if you are looking at the data from multiple parts of the pipeline, then yes you have to control them independently. There are some tricks to join them together, but if you’re scripting anyway.
Even though the trace is not capturing it, it is possible to control the visibility. Here is an example python script that adds a visibility track to the active pipeline object.
visibilityTrack = GetAnimationTrack('Visibility')
keyframe0 = CompositeKeyFrame()
keyframe0.Interpolation = 'Boolean'
keyframe0.KeyTime = 0
keyframe0.KeyValues = 
keyframe1 = CompositeKeyFrame()
keyframe1.KeyTime = 4
keyframe1.KeyValues = 
visibilityTrack.KeyFrames = [keyframe0, keyframe1]
Ken, Sandia took this one. As I don’t have anyone asking for it, low priority.
Thanks, it works! Although I do get the following error
“Multiple proxies matched. This use-case is currently not supported. ERROR: In /home/zetison/programs/paraview/Remoting/ServerManager/vtkSMMultiplexerSourceProxy.cxx, line 265
vtkSMMultiplexerSourceProxy (0x556dc0a7d9a0): Multiple proxies matched. This use-case is currently not supported.”
Maybe it is because it somehow detects several “active pipeline objects”? Is it possible to pass an python object from (say) PVDreader?
I’ve never run into that error message before, and I cannot replicate it. This might be somewhat unrelated to the original question. You might be able to fix the problem by specifying the source proxy with the
proxy argument to
GetAnimationTrack('Visibility', proxy=reader1)). If that doesn’t work, then I suggest creating a new discourse topic with your script and more information about your error (such as on what line does it occur). Someone with more of the scripting experience might be able to help.