[Paraview] Communication from Python to own C++ reader

Fabian Wein fabian.wein at am.uni-erlangen.de
Thu Oct 15 09:19:21 EDT 2009


Hi,

it's me again - I have the impression that nothing that I try really
works :(
But I'm getting closer :)

I get access to my reader from python via
r = GetSources().items()[0][1]

I want to get an integer value from my reader.

The only way I know to do this, is:

*.h
  vtkSetMacro(CurrentPolledStep, int);
  vtkGetMacro(CurrentPolledStep, int);
  int CurrentPolledStep;

and *.xml
     <!-- Allow AnimationReader.py to check if there is a new in-situ
result -->
     <IntVectorProperty  name="CurrentPolledStep"
       command="SetCurrentPolledStep"
       number_of_elements="1"
       default_values="1">
       <BooleanDomain name="int"/>
       <Documentation>
         Current step determined by the reader step.
       </Documentation>
     </IntVectorProperty>

I actually don't want to have it in the GUI but that's the only way I
found.

It is also displayed as a checkbox in the GUI but according to
classvtkSMBooleanDomain.html
it shall take any int value.

I also have a TimeStep value from a range.

In python I always get the value set in the GUI but not the current
value in my
C++ object.

I call Modified() within C++ after setting and
r.UpdatePipelineInformation()
in python but
r.TimeStep
and
r.CurrentPolledStep
don't change in python.

Any hint?

Thanks,

Fabian


More information about the ParaView mailing list