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

Mathieu Westphal mathieu.westphal at kitware.com
Tue Sep 13 05:58:03 EDT 2016


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20160913/8ed4f124/attachment.html>


More information about the Paraview-developers mailing list