[Paraview] bug in .py save state
joseph insley
insley at anl.gov
Tue Oct 15 12:49:20 EDT 2013
Hi,
It looks like there is a bug in the naming of objects when the state is saved as a python state file. ParaView appears to parse the guiName given to a filter to remove special characters when creating the name for objects in the state file. In my case, I create two contour filters, one with a positive value, one with the negative of the same value. In the pipeline browser in the GUI, I name each contour filter with its value so that I can remember which one is which. When I save the state ParaView filters out the minus sign, and both objects end up with the same name. Subsequently, only the second to be defined can be referenced, and the first is lost, and not added to the renderer. This only seems to be a problem when saving as a python state file. I do not see this problem when saving and reloading a .pvsm state.
SetActiveSource(Calculator2)
W0_025 = Contour( guiName="W: -0.025", Isosurfaces=[-0.025], ComputeNormals=1, GenerateTriangles=1, ComputeGradients=0, ComputeScalars=0, ContourBy=['POINTS', 'W'], PointMergeMethod="Uniform Binning" )
W0_025.PointMergeMethod.Numberofpointsperbucket = 8
W0_025.PointMergeMethod.Divisions = [50, 50, 50]
SetActiveSource(Calculator2)
W0_025 = Contour( guiName="W: 0.025", Isosurfaces=[0.025], ComputeNormals=1, GenerateTriangles=1, ComputeGradients=0, ComputeScalars=0, ContourBy=['POINTS', 'W'], PointMergeMethod="Uniform Binning" )
W0_025.PointMergeMethod.Numberofpointsperbucket = 8
W0_025.PointMergeMethod.Divisions = [50, 50, 50]
This was easy enough to fix in the resulting script by just renaming the object that had the minus sigh dropped, but wanted to share in case others ran into similar issues.
Thanks,
joe
More information about the ParaView
mailing list