<div dir="ltr"><div>In ./ParaViewCore/ServerManager/SMApplication/Resources/filters.xml in the source code there's the following section which gives the options and GUI layout:<br> <SourceProxy class="vtkExtractBlock"<br> label="Extract Block"<br> name="ExtractBlock"><br> <Documentation long_help="This filter extracts a range of blocks from a multiblock dataset."<br> short_help="Extract block.">This filter extracts a range<br> of groups from a multiblock dataset</Documentation><br> <InputProperty command="SetInputConnection"<br> name="Input"><br> <ProxyGroupDomain name="groups"><br> <Group name="sources" /><br> <Group name="filters" /><br> </ProxyGroupDomain><br> <DataTypeDomain name="input_type"><br> <DataType value="vtkMultiBlockDataSet" /><br> </DataTypeDomain><br> <Documentation>This property specifies the input to the Extract Group<br> filter.</Documentation><br> </InputProperty><br> <IntVectorProperty clean_command="RemoveAllIndices"<br> command="AddIndex"<br> name="BlockIndices"<br> number_of_elements_per_command="1"<br> panel_visibility="default"<br> repeat_command="1"><br> <CompositeTreeDomain mode="all"<br> name="tree"><br> <RequiredProperties><br> <Property function="Input"<br> name="Input" /><br> </RequiredProperties><br> </CompositeTreeDomain><br> <Hints><br> <WidgetHeight number_of_rows="20" /><br> </Hints><br> <Documentation>This property lists the ids of the blocks to extract<br> from the input multiblock dataset.</Documentation><br> </IntVectorProperty><br> <IntVectorProperty command="SetPruneOutput"<br> default_values="1"<br> name="PruneOutput"<br> number_of_elements="1"><br> <BooleanDomain name="bool" /><br> <Documentation>When set, the output mutliblock dataset will be pruned<br> to remove empty nodes. On by default.</Documentation><br> </IntVectorProperty><br> <IntVectorProperty command="SetMaintainStructure"<br> default_values="0"<br> name="MaintainStructure"<br> number_of_elements="1"><br> <BooleanDomain name="bool" /><br> <Documentation>This is used only when PruneOutput is ON. By default,<br> when pruning the output i.e. remove empty blocks, if node has only 1<br> non-null child block, then that node is removed. To preserve these<br> parent nodes, set this flag to true.</Documentation><br> </IntVectorProperty><br> <!-- End ExtractBlock --><br> </SourceProxy><br><br></div>Creating something similar for you may work. If you search the code for things like vtkSMIntVectorProperty.cxx/h you should find information on how the corresponding IntVectorProperty.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 15, 2016 at 7:18 AM, Jorge Bañuls <span dir="ltr"><<a href="mailto:jorgebanuls@gmail.com" target="_blank">jorgebanuls@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Andy,<br><br></div>Indeed, the vtkExtractBlock filter is what I'm using in my script to extract the blocks, which are currently specified by the user in the properties panel as a string with the name of the block(s). Now that you mention it though, it could be useful to see how this filter creates the checklist. Is there a way to access the code behind this filter?<br><br></div>Thanks a lot for your help,<br><br></div>Jorge Bañuls<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 15 July 2016 at 12:06, Andy Bauer <span dir="ltr"><<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Have you looked at the Extract Blocks filter? That may already be doing what you need and if not, it at least shows how to check the boxes for blocks that you want.<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Fri, Jul 15, 2016 at 6:53 AM, Jorge Bañuls <span dir="ltr"><<a href="mailto:jorgebanuls@gmail.com" target="_blank">jorgebanuls@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div>Hi,<br><br></div>I'm developing a filter for Paraview and I need to be able to select blocks from the properties panel (the input is a vtkMultiBlockDataSet). The approach I'm using right now is to write the name of the block(s) and then process that string within the script, but I would like to be able to check the blocks I need from a list. I've seen many examples of how to do this, but only for variables arrays (e.g. the list displays the cell arrays existing in the input). Any ideas on how to apply this to display and select the blocks?<br><br></div>Thanks in advance for your help,<br><br></div>Jorge Bañuls<br></div>
<br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=Paraview-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=Paraview-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</blockquote></div><br></div>