[Paraview] Using GUI element Scale
Mattijs Janssens
m.janssens at nabla.co.uk
Thu Jul 1 13:24:40 EDT 2004
Hello Jean,
Thanks for that. I'll download the cvs version and give it a go.
Regards,
Mattijs
Jean M. Favre wrote:
> Mattijs Janssens wrote:
>
>> I need to define a time step selector so
>>
>> In my PVFoamReader.xml I have:
>>
>> <Scale variable="TimeStep"
>> trace_name="TimeStep"
>> type="int"
>> label="Time step"
>> range="0 1"
>> default_value="0"
>> display_entry="1"
>> display_value="1"
>> entry_and_label_on_top="0"
>> help="Set the current time step."
>> range_source="TimeStepRange" />
>>
>> which will setup a call to GetTimeStepRange to get the max and min for
>> the
>> slider.
>
>
> you are close to the solution.
>
> Your XML looks good.
>
> your reader should include:
>
> class VTK_IO_EXPORT vtkfoo : public vtk???
> {
> public:
> vtkSetVector2Macro(TimeStepRange,int);
> vtkGetVector2Macro(TimeStepRange,int);
> protected:
> int TimeStepRange[2];
> };
>
> and your *.cxx reader source code can do the following during the
> ExecuteInformation phase:
>
> this->SetTimeStepRange(0, this->NbTimeSteps-1);
>
>
> It works for me. I use PV1.5 nightly.
>
> Cheers
More information about the ParaView
mailing list