I’m having trouble adding a proxy property to an existing source proxy.
On Paraview 5.7, after loading an already existing state file containing a source proxy instance, selecting the instance shows an empty proxy property rather than a given proxy from the proxy_list.
I do not find commits related to this behavior in recent commits so I believe it should still be the same on 5.9. Perhaps I did something wrong or is it simply by design?
Can you elaborate? Preserving values for proxy properties when loaded from state files is critical to any functional loading of state files so I don’t think that’s the issue here. Something else is going on.
I’ve just realized I could’ve been clearer on this. My issue is about adding a proxy property to a filter already used in our state files. If I update the XML definition of the filter, compile and load the state file, the property shows as empty. I do confirm that saving a state file with a value selected preserves the said value.
Although it is possible to make a v2 version of the filter, maybe there is some kind of mechanism I can use such as using vtkSMStateVersionController
Assuming you’re doing this in a ParaView plugin and not a custom application, there;s no easy way. Maybe creating an auto-load plugin that monitors pqApplicationCore::aboutToLoadState and then modify the XML state to take into account your change is a way to go.
It is a custom application with our own modules attached to it. The filter in question would be found inside one of the modules. Let’s say I add the following proxy property to the filter (Example taken here):
There is no mechanism pushing GaussianKernel as the default value? If I instantiate the filter, I know the first element of the list (VoronoiKernel) is chosen.
If I load a state file with the filter previously saved without the proxy property, I’d have to add a mechanism in pqApplicationCore::aboutToLoadState to add the correct proxy to the XML state?
Wouldn’t it be better to edit vtkSMProxyListDomain for support of something similar in the style of default_values="GaussianKernel"?