[Paraview-developers] Proxy Property names & labels

Joachim Pouderoux joachim.pouderoux at kitware.com
Mon Oct 31 14:06:26 EDT 2016


Hi,

Writing a python script for PV5.2, I needed to save a temporal ptvtu file
and faced this problem again: looking at the proxy's XML definition, the
writer has the *name=*WriteAllTimeSteps property.

      <IntVectorProperty command="SetWriteAllTimeSteps"
                         default_values="0"
                         label="Write all timesteps as file-series"
                         name="WriteAllTimeSteps"
                         number_of_elements="1">

So I tried something like this:

  SaveData("test.pvtu", WriteAllTimeSteps=1)

But it failed claiming that the writer has no WriteAllTimeSteps property!
Well, looking at the help() on the writer instance it looked like indeed,
the exposed python property is not call WriteAllTimeSteps but
Writealltimestepsasfileseries:
 |  Writealltimestepsasfileseries
 |      When WriteAllTimeSteps is turned ON, the writer is
 |      executed once for each timestep available from the
 |      reader.

Isn't it ugly?
So is the choice of exposing the property using its concatenated label a
deliberate choice or a bug?
It seems to me very unnatural, the label should be reserved for better
human readable UI printing.

What do you think?

Best,

*Joachim Pouderoux*, PhD

*Technical Expert - Scientific Computing Team*
*Kitware SAS <http://www.kitware.fr>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20161031/6df37547/attachment.html>


More information about the Paraview-developers mailing list