I’m trying to build paraview plugin Temporal Interpolator outside paraview source because i want to its property DiscreteTimeStepInterval to be displayed in a dropdown list instead of a double input, which is possible, right?.
Since this filter already exists in paraview, I have the source .h|.cxx files and altered ServerManager xml, however, I’m puzzled over the Module file. I’m not sure which module it depends on and so I simiply copied an example and CMake reported errors: CMake Error at E:/ParaView-Build/lib/cmake/paraview-5.7/ParaViewPlugin.cmake:532 (message):
Unparsed arguments for paraview_add_plugin:
MODULE;TemporalInterpolator::TemporalaInterpolator
How should I fix this, or is there any convenient way to do this?
Thanks! It works and I’m able to choose the new filter in the alphabetical filter menu.
However, as I mentioned above, a drop down list is what I want, and I changed the XML property to <EnumerationDomain with several Entry as Plugin_HowTo#Drop down list describes. As a result, the property DiscreteTimeStepValue was displayed without a dropdown list, nor even any input, just like this:
Is the GUI parameter EnumerationDomain deprecated or it won’t work in this case?
The DoubleVectorProperty does not support enumeration domain sadly.
I’m afraid you need to create a class inheriting vtkTemporalInterpolator with its own int interface, then you could be able to control it from an IntVectorProperty.
But it will lose its meaning if set to int type, it has to be double(0.0~1.0) for interpolation. Do you think it possible for me to create a custom property widget(e.g. Exclusive QGroupBox), which has almost identical function, to show this property? Or the DoubleVectorProperty is just incompatible with any enum type widgets?
I think I found the solution. The property DiscreteTimeStepValue could be used to both aggregate(when set >1) and interpolate(when set between 0~1) dataset timesteps, while the latter function could be replaced by another proeprty ResampleFactor, which was not exposed in SM XML. A issue was raised: https://gitlab.kitware.com/paraview/paraview/-/issues/19979.
In my case, I add the property ResampleFactor in sm xml and it works. So I guess there is no need to set DiscreteTimeStepValue to double type, an integar value is all we need plus ResampleFactor. Is it ok for me if I manually change the type of DiscreteTimeStepValue to int from the source?
The amazing thing is that I made it work not by rewriting the source but changing the xml property from DoubleVectorProperty to IntVectorProiperty and then the EnumerationDomain works. Here it is:
You can see all the enum were listed and ResampleFactor was shown. I hope this is a side-effect other than a potential bug.
For the double values, which are not needed, they are not, and I’ll remove them. But for the integar values, yes they are, at least I didn’t see any weird result yet. How do you think?