[Paraview] Communication from Python to own C++ reader
Sven Buijssen
sven.buijssen at tu-dortmund.de
Thu Oct 15 09:37:29 EDT 2009
Hi Fabian,
It should be possible to hide CurrentPolledStep from the GUI by adding this to
your XML file (didn't test it, though):
<Hints>
<!-- This property is here simply to get it. -->
<Property name="CurrentPolledStep" show="0" />
</Hints>
Look at ParaView3/Servers/ServerManager/Resources/readers.xml for examples where
to put it exactly.
Your problem with
r.CurrentPolledStep
not changing might be caused by your XML. I guess it should read:
<IntVectorProperty name="CurrentPolledStep"
command="GetCurrentPolledStep" ....>
Please note the "Get" instead of the "Set".
Sven
----- Original Message -----
From: Fabian Wein <fabian.wein at am.uni-erlangen.de>
To: "paraview at paraview.org" <paraview at paraview.org>
Sent: 10/15/09 15:19:21
Subject: [Paraview] Communication from Python to own C++ reader
> 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
> _______________________________________________
> 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
More information about the ParaView
mailing list