hello,
context: While scripting in paraview, I imagine i am not the only one, if i have a open paraview instance and I want to check how to modify a specific filter or how to call it to create it in paraview. I do, tools/start trace/show incremental trace (normally skip rendering also)
issue/situation for this improvement to take place: once i turn on the trace I click on a filter that was not currently selected, that i want to change or want to apply a new filter over. this will open the trace script window and show something like this:
# trace generated using paraview version 6.0.1
#import paraview
#paraview.compatibility.major = 6
#paraview.compatibility.minor = 0
#### import the simple module from the paraview
from paraview.simple import *
#### disable automatic camera reset on 'Show'
paraview.simple._DisableFirstRenderCameraReset()
# find source
box3 = FindSource('Box3')
# set active source
SetActiveSource(box3)
and if after i apply the desired filter for example Threshold() the trace script will add the following lines:
# create a new 'Threshold'
threshold1 = Threshold(registrationName='Threshold1', Input=box3)
# find source
box1 = FindSource('Box1')
# find source
box2 = FindSource('Box2')
# find source
box4 = FindSource('Box4')
UpdatePipeline(time=0.0, proxy=threshold1)
the issue is, when we have a quite large already constructed pipeline, as paraview will add the FindSource(‘…’) the threshold part (what we want to know) will be lost. even if we are using the filter over the Box3 the others will be get after, even if we do a source filter such as another box.
proposal: My proposal is simply that all the FindSource are placed together in the beigning, that when the script does the box3 = FindSource('Box3') it also does all the others. this way at the end of the script when we apply the threshold we will get simply the lines:
# create a new 'Threshold'
threshold1 = Threshold(registrationName='Threshold1', Input=box3)
UpdatePipeline(time=0.0, proxy=threshold1)
this was a dummy example with 3 boxes, with a existing complete tree of pipeline the ‘interest’ part is completly lost as the FindSource(‘’) and others… currently to get around this i create a dummy source like a sphere, and then I apply what I want to see on the trace, so the sphere filter gets lost, all the FindSource are writed and then everything i do is placed correctly at the end of the script.