That's it !

And what you purpose should work well, but I would like to do a simple
plugin, that doesn't need to compile Paraview, and could work with the
paraview executables.

My xml file looks like this :
<ServerManagerConfiguration>
  <ProxyGroup name="sources">

  <!-- server manager xml for a python script that read a v3d file.
       the auto generated panel for this exposes everything more than we
want so
       a custom panel would be good -->
    <SourceProxy name="ReaderV3D" class="vtkPythonProgrammableFilter"
                 label="ReaderV3D">
      <Documentation
         long_help=""
         short_help="">
      </Documentation>

      <!-- data set type -->
      <IntVectorProperty
        name="OutputDataSetType"
        command="SetOutputDataSetType"
        number_of_elements="1"
        default_values="13">
        <!-- value of 13 means MultiBlockDataSet -- Thanks Utkarsh !-->
      </IntVectorProperty>

      <!-- the script -->
     <StringVectorProperty
        name="Script"
        command="SetScript"
        number_of_elements="1"
        default_values="import pyturbo; &#xa;pdo =
self.GetOutput();&#xa;exec 'Simu = pyturbo.%s'%(NomSimulation)&#xa;data =
pyturbo.MultiBlocFromV3D(Simu, [DebutNomMai, FinNomMai], [DebutNomAero,
FinNomAero], NumerosBlocs);&#xa;&#xa;pdo.DeepCopy(data);&#xa;">
     </StringVectorProperty>

     <!-- python script references a variable "NomSimulation"
          we expose this as a property allowing the user to set it -->
     <StringVectorProperty
       name="NomSimulation"
       command="SetParameter"
       number_of_elements="2"
       default_values_delimiter=";"
       default_values="NomSimulation;'s'">
     </StringVectorProperty>

................ etc.

There isn't a  simple xml command that's looks like
StringVectorProperty/SetParameter, but returning a character, isn't it ?
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to