<div dir="ltr">Hello
<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Shuhao,</span><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"> thank you for your reply and for your really great job on the pvpyfilter. I had already tried it and it's very useful. </span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">But I'm looking for the possibility to automatically assign the slider range (in this case the upper value will be enough) depending on information about the input of the programmable filter (in this case the number of blocks of a multiblock dataset) and not to set it hardcoded in the xml as from your approach. I would like that, if I apply this filter to a mbdataset with 5 blocks, the slider can choose an int value from 0 to 4, and if I apply the same filter (without modifying xml) to another mbdataset with 8 blocks the slider provides an int from 0 to 7.</span></div><div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="font-size:12.8px">Cheers</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Alessandro</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">PS With pvpyfilter is there the possibility of decide in the .py file the order of the widgets in the property panel? It seems to me that the order is random </span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 22, 2018 at 12:39 AM, Shuhao Wu <span dir="ltr"><<a href="mailto:shuhao@shuhaowu.com" target="_blank">shuhao@shuhaowu.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Accidentally hit Reply instead of hit Reply list. The record is below:<span class="im HOEnZb"><br>
<br>
-------- Forwarded Message --------<br>
Subject: Re: [Paraview] XML plugin based on programmable filter with a slider<br>
Date: Wed, 21 Mar 2018 19:38:40 -0400<br>
From: Shuhao Wu <<a href="mailto:shuhao@shuhaowu.com" target="_blank">shuhao@shuhaowu.com</a>><br>
To: Alessandro De Maio <<a href="mailto:demaio.a@gmail.com" target="_blank">demaio.a@gmail.com</a>><br>
<br>
Hello Alessandro,<br>
<br>
I just published a library that allows you to do _just this_. See: <a href="https://github.com/shuhaowu/pvpyfilter" rel="noreferrer" target="_blank">https://github.com/shuhaowu/pv<wbr>pyfilter</a><br>
<br>
The example covers exactly this and specifically you can use the property:<br>
<br>
double_slider = Double("double with slider", default=0.5, slider=[0.0, 1.0], help="double with slider between 0.0 and 1.0 and a default of 0.5")<br>
<br>
Let me know if the library works for you or if you encounter any bug as it is still early days for this library.<br>
<br>
Cheers,<br>
Shuhao<br>
<br>
On 2018-03-21 01:37 PM, Alessandro De Maio wrote:<br></span><div class="HOEnZb"><div class="h5">
> Hello,<br>
> I'm trying to write a plugin based on a programmable filter in order to<br>
> extract a single block from a multiblockdataset (with a single level tree)<br>
> in input chosing it through a slider in the property panel.<br>
> I need help to automatically set the range of the slider (the higher limit<br>
> as the lower is always 0) as the number of blocks of the multiblockdataset<br>
> in input, but the XML ServerManager definition of the slider is not clear<br>
> enough for me.<br>
><br>
> I'm trying to follow Utkarsh suggestion in<br>
><br>
> <a href="https://public.kitware.com/pipermail/paraview/2009-March/011599.html" rel="noreferrer" target="_blank">https://public.kitware.com/pip<wbr>ermail/paraview/2009-March/011<wbr>599.html</a><br>
><br>
> but I'm missing how to recovery the number of blocks of the input of the<br>
> programmable filter and how to set it as the upper value of the slider<br>
> range.<br>
><br>
> Thank you in advance for your kind help<br>
><br>
> Alessandro<br>
><br>
><br>
><br></div></div><div class="HOEnZb"><div class="h5">
> ______________________________<wbr>_________________<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/opensou<wbr>rce/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaV<wbr>iew</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="https://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">https://public.kitware.com/mai<wbr>lman/listinfo/paraview</a><br>
><br>
______________________________<wbr>_________________<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/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaV<wbr>iew</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">https://public.kitware.com/mai<wbr>lman/listinfo/paraview</a><br>
</div></div></blockquote></div><br></div>