[Paraview] Plugin XML - property as astring

Aurélien Marsan aurelien.marsan at ecl2009.ec-lyon.fr
Mon Jun 14 05:51:01 EDT 2010


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 ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100614/1df51377/attachment.htm>


More information about the ParaView mailing list