Hello David, <br><br>I am in the same situation. <br>Here is what I have done : <br><ol><li>Create the reader in python, that works with pvpython, and returns (in my case) a vtkMultiBlockDataSet</li><li>Then create a "MyReader.xml" file. <br>
That calls a vtkPythonProgrammableFilter, in which I import my reader and execute it.</li></ol>Here is the contents of this file<br><br><ServerManagerConfiguration><br> <ProxyGroup name="sources"><br>
<br> <!-- server manager xml for a python script that reads a file<br> the auto generated panel for this exposes everything more than we want so<br> a custom panel would be good --><br> <SourceProxy name="ReaderV3D" class="vtkPythonProgrammableFilter"<br>
label="ReaderV3D"><br> <Documentation<br> long_help=""<br> short_help=""><br> </Documentation><br> <br> <!-- data set type --><br>
<IntVectorProperty <br> name="OutputDataSetType" <br> command="SetOutputDataSetType" <br> number_of_elements="1"<br> default_values="13"> <br>
<!-- value of 13 means MultiBlockDataSet --><br> </IntVectorProperty><br> <br> <!-- the script --><br> <StringVectorProperty <br> name="Script" <br> command="SetScript"<br>
number_of_elements="1"<br> default_values="import pyturbo; pdo = self.GetOutput();data = pyturbo.read(file);pdo.DeepCopy(data);"><br><!--<br> <Hints><br> <Widget type="multi_line"/><br>
</Hints><br>--><br> </StringVectorProperty><br> <br> <!-- python script references a variable "file" <br> we expose this as a property allowing the user to set it --><br>
<StringVectorProperty<br> name="file"<br> command="SetParameter"<br> number_of_elements="2"<br> default_values_delimiter=";"<br> default_values="file;'give_the_path_of_the_file'"><br>
</StringVectorProperty><br> <br> </SourceProxy><br> </ProxyGroup><br></ServerManagerConfiguration><br><br>Note that if you want to give a string as argument, you have to use the quotation marks.<br>
At this point, you just have to import the .xml as a plugin in Paraview<br><br>That may correspond to what you want to do. <br><br>Regards,<br><br>A.Marsan<br>