[Paraview-developers] Double levels of dynamism in XML Property

Mathieu Westphal mathieu.westphal at kitware.com
Tue Sep 13 07:16:34 EDT 2016


You're right,
though Joachim pointed out to me that i can serialize the
DoubleVectorProperty values into a string and pass it as an element of the
StringVectorProperty.

So problem solved for me.

Mathieu Westphal

On Tue, Sep 13, 2016 at 1:14 PM, Utkarsh Ayachit <
utkarsh.ayachit at kitware.com> wrote:

> That's some cryptic API on the class that you're writing this proxy
> for! I don't exactly follow what those arguments are. In any case, you
> can write your own vtkSIProperty subclass and then add support for
> such non-standard APIs.
>
>
>
> On Tue, Sep 13, 2016 at 5:58 AM, Mathieu Westphal
> <mathieu.westphal at kitware.com> wrote:
> > Hi All
> >
> > I'm trying to create an XML property with a double level of dynamism, and
> > can't figure out the right way to do it :
> >
> > So i have a repeat_command StringVectorProperty looking like that
> >
> >       <StringVectorProperty animateable="1"
> >                             clean_command="RemoveAllArraysToGenerate"
> >                             command="SetArrayToGenerate"
> >                             name="ArrayToGenerate"
> >                             element_types="2 0 0 1"
> >                             number_of_elements_per_command="4"
> >                             repeat_command="1"
> >                             set_number_command="
> SetNumberOfArraysToGenerate"
> >                             use_index="1">
> >       </StringVectorProperty>
> >
> > But the thing is, the last element of the command is not suposed to be a
> > single double, but an array of double of variable size
> >
> > I've managed to work around it this way :
> >       <StringVectorProperty animateable="1"
> >                             clean_command="RemoveAllArraysToGenerate"
> >                             command="SetArrayToGenerate"
> >                             name="ArrayToGenerate"
> >                             element_types="2 0 0"
> >                             number_of_elements_per_command="3"
> >                             repeat_command="1"
> >                             set_number_command="
> SetNumberOfArraysToGenerate"
> >                             use_index="1"
> >                             panel_visibility="never">
> >       </StringVectorProperty>
> >
> >       <DoubleVectorProperty animateable="1"
> >                             command="SetLastArrayConstantValue"
> >                             name="LastArrayConstantValue"
> >                             number_of_elements_per_command="1"
> >                             repeat_command="1"
> >                             use_index="1"
> >                             panel_visibility="never">
> >       </DoubleVectorProperty>
> >
> > But you can clearly see this will work only if i update the second
> property
> > right after updating the first one, and will definitelly not work with
> > statefiles.
> >
> > Any idea how I could do that correctly ?
> >
> > Thanks.
> >
> > Mathieu Westphal
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Search the list archives at:
> > http://markmail.org/search/?q=Paraview-developers
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/paraview-developers
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20160913/359790d2/attachment.html>


More information about the Paraview-developers mailing list