Hello,
I am facing a annoying behavior that would love to be modify for future releases of paraview.
I am comparing two different meshes of same object with different refinements.
so my idea is to have exactly the same image of the two objects.
so:
I load the two meshes into paraview (change for each to solid color and surface with edges)
I place the camera at the desired location
I hide mesh1 and leave mesh0 shown
I take first screenshot of mesh0
I show mesh1
hide mesh0
i take second screenshot (for mesh1)
this gives as expected, the same image with two different refinements. what is quite frustrating is that if I hide mesh0 BEFORE showing mesh1 (so all the objects on the pipeline are hiden) when I show mesh1 the camera angle will be the correct one but the location not (it will show the complete mesh (as if one would have used zoom closest to data or reset camera closest when the mesh1 was show again). this is quite annoying, as if by error we do this, we need to go back to the first mesh as it is quite difficult to be at ‘the same exact location of the camera’ again.
the feature request, would be to keep the camera at exact position, so if we hide everything and show mesh1 again, it will be placed at same location.
an example of this (mesh0 and mesh1 are a box and the 3D deleurian of it):
Open ParaView settings and find the setting (on the General tab) labeled Reset Display Empty Views. Uncheck that option and the camera will no longer reset when making an object visible in an empty view.
Oh thanks! didnt know that it was already available! thanks again, I ask it here and if it is not available i will make a post, but now that I see the settings i also saw the Inherit Representation Properties which is awsome! does exist one for inherit the field that one is showing? like if we are showing ‘U mag’ and then use a clip the clip filter will show ‘p’ instead of ‘U mag’.
thanks
I’m not sure I totally understand your question. I think what you are asking is that when you apply a filter, you want the result of the filter to be colored by the same array as the input. This is true regardless of whether Inherit Representation Properties is set.
There is however, an exception. If your data has ‘active scalars’ set, then those will always be used to color new data. Active scalars are a hidden, sticky attribute in the VTK layer that is hard to get rid of. One way to do this is to create a Programmable Filter and use this as the script:
def CopyFields(infields, outfields):
for i in range(infields.GetNumberOfArrays()):
outfields.AddArray(infields.GetArray(i))
def CopyBlock(indata, outdata):
outdata.CopyStructure(indata)
CopyFields(indata.GetPointData(), outdata.GetPointData())
CopyFields(indata.GetCellData(), outdata.GetCellData())
input = self.GetInputDataObject(0, 0)
output = self.GetOutputDataObject(0)
if input.IsA("vtkCompositeDataSet"):
output.CopyStructure(input)
iter = input.NewIterator()
iter.InitTraversal()
while not iter.IsDoneWithTraversal():
indata = iter.GetCurrentDataObject()
outdata = indata.NewInstance()
CopyBlock(indata, outdata)
output.SetDataSet(iter, outdata)
iter.GoToNextItem()
else:
CopyBlock(input, output)
Note that this filter will strip all field attributes such as normals, so there may be side effects.
hello, thanks for the help,
what I was looking for is that when we apply a filter to a source on the pipeline (keep the coloring of the source) for example I have openfoam reader source, where I am coloring it using cell data ‘U’ & ‘magnitude’, and then I apply a clip to keep half of the geometry, the new filter (clip1) will go automatically to point data ‘p’. if there was any setting to set a default where the coloring is kept (ie., that the clip1 also will be colored with cell data ‘U’ & ‘magnitude’)
regards