I guess the error name 'UpdatePipelineInformation' is not defined is related.
The information property visibility has only been added recently.
However, UpdatePipelineInformation() work in ParaView 5.7, but it is a source method :
GetActiveSource().UpdatePipelineInformation()
but this doesn’t seem to work for the plugin class itself.
vtkDoubleArray* myPlugin::GetDependentParameters(){
// requires: std::vector<double>* parameters; defined elsewhere
// requires: vtkDoubleArray* dependentParameter; defined elsewhere
dependentParameter->SetNumberOfComponents(1);
dependentParameter->SetNumberOfTuples(parameters->size());
for (auto i = 0ul; i < parameters->size(); ++i)
// myFunction: x -> 2*x, an arbitrary function, defined elsewhere
dependentParameter->SetTuple1(i, myFunction(parameters->at(i)));
return dependentParameter;
}
The dependentParameters can now be called from python CLI as
# paraview 5.7
s = GetActiveSource()
s.Parameter = [1, 2, 3]
s.UpdatePipelineInformation()
DependentParameters = [s.SMProxy.GetProperty("DependentParameters").GetElement(i) for i in range(s.SMProxy.GetProperty("DependentParameters").GetNumberOfElements())]
DependentParameters # > [2, 4, 6]
# paraview 5.8+
s = GetActiveSource()
s.Parameter = [1, 2, 3]
s.UpdatePipelineInformation()
s.DependentParameters # > [2, 4, 6]
Note: the 5.8+ solutions has not been tested yet.
Big thank you to Mathieu and Cory for all the help!
Art