Skip to content

vtkPTSDefinitionManager: Add API to restrict inputs to filters

vtkPTSDefinitionManager now has a new method

std::vector<vtkSmartPointer<vtkSMProxy>> GetCompatibleDefinitions(const std::vector<vtkSmartPointer<vtkSMProxy>>& smproxies, const std::string& groupName) const

that returns the prototypes of proxies in groupName that can accept as Input (on the 0th port only for now) smproxies.

in python the wrapper returns a pair of group name and proxy name :

for group, name in definitionManager.GetCompatibleDefinitions(wavelet, "filters"):
    print(group,name) # all the filters that accept the wavelet as input e.g. vtkContourFilter

for group, name in definitionManager.GetCompatibleDefinitions([sphere, shrink], "filters"):
    print(group,name) # all the filters that accept sphere and shrink  a single input. e.g. vtkAppend
Edited by Christos Tsolakis

Merge request reports