Hi all,
I’m creating a new filter along with its Paraview (xml) interface.
In this filter I have a lot of parameters. A parameter is composed of 3 components:
- a boolean that specifies whether the parameter is given as a constant value or a grid property
- a constant value (if the previous boolean is false)
- a grid property (if the previous boolean is true)
I managed to do it for one parameter (cf xml code below), but now I have to do it for many other parameters (only the label and the commands change from one parameter to another).
Is there a way to create a kind of template that I could define once then use any number of times. Maybe there is already one somewhere?
Thank you for your time
Simon
XML code for 1 parameter:
<IntVectorProperty
name="UseProperty"
label="Use property"
command="SetUseProperty"
number_of_elements="1"
default_values="0">
<BooleanDomain name="bool"/>
</IntVectorProperty>
<DoubleVectorProperty
name="Constant"
label="Constant"
command="SetConstant"
number_of_elements="1"
default_values="0">
<Hints>
<PropertyWidgetDecorator type="ShowWidgetDecorator">
<Property name="UseProperty" function="boolean_invert" />
</PropertyWidgetDecorator>
</Hints>
</DoubleVectorProperty>
<StringVectorProperty name="Property"
label="Property"
command="SetProperty"
number_of_elements="1"
animateable="0">
<ArrayListDomain name="array_list"
attribute_type="Scalars"
input_domain_name="inputs_array">
<RequiredProperties>
<Property name="Input"
function="Input" />
</RequiredProperties>
</ArrayListDomain>
<Hints>
<PropertyWidgetDecorator type="ShowWidgetDecorator">
<Property name="UseProperty" function="boolean" />
</PropertyWidgetDecorator>
</Hints>
</StringVectorProperty>