I am trying to create filter via the VTKPythonAlgorithmBase class, and I want this filter to essentially be like the existing ExtractBlock filter, but only display the first level of child blocks in the multiblock data set, not the children of those children.
For example, below I’m showing the GUI input for an ExtractBlock filter on my dataset. The filter I want to design would only show “Solid”, and wouldn’t show “1_part1”, “2_part2”, etc.
For me, the difficulty has arisen in how I should set up the @smproperty
decorator for this. My first attempt is below, and is basically an exact copy of ExtractBlock.
@smproperty.xml("""
<IntVectorProperty clean_command="CleanNames"
command="AddName"
name="BlockNames"
number_of_elements_per_command="1"
panel_visibility="default"
repeat_command="1">
<CompositeTreeDomain name="tree">
<RequiredProperties>
<Property function="Input" name="Input"/>
</RequiredProperties>
</CompositeTreeDomain>
</IntVectorProperty>
""")
def AddName(self, user_inp):
self.user_indices.append(user_inp)
If I only wanted to show the first tier of child blocks, can it be done with the same input, and just a different Domain type or modification to the Domain? Or would I have to find a way to trim the input and continue using CompositeTreeDomain?