[Paraview] Question about adding Widget to property panel
David E DeMarle
dave.demarle at kitware.com
Mon Jan 2 14:14:27 EST 2017
Make sure to expose that in the proxy definition that contains the
P3DReaderCore proxy definition too.
ie, look further down in readers.xml and you will find
<SourceProxy class="vtkFileSeriesReader"
file_name_method="SetQFileName"
label="PLOT3D Reader"
name="P3DReader"
si_class="vtkSIMetaReaderProxy">
...
<SubProxy>
<Proxy name="Reader"
proxygroup="internal_sources"
proxyname="P3DReaderCore"></Proxy>
<ExposedProperties>
<Property name="FileName" />
...
<Property name="ForceRead" />
add this
<Property name="Gamma" />
...
</ExposedProperties>
</SubProxy>
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909
On Thu, Dec 29, 2016 at 6:56 PM, Beach, Timothy A. (GRC-LTE0)[Vantage
Partners, LLC] <timothy.a.beach at nasa.gov> wrote:
> Hi, I’m trying to do something I thought would be simple and I’ll bet it
> is once I see my error - but I’ve spent several hours trying things and
> searching for answers in the docs. I want to add an entry box in the
> property panel for Gamma in the PLOT3D reader. I’m compiling version 5.2.
> I noticed in the header file that there are already MACRO’s for Gamma:
> /**
> * Set/Get the ratio of specific heats. Default is 1.4.
> */
> vtkSetMacro(Gamma,double);
> vtkGetMacro(Gamma,double);
>
> I thought all I would have to do is add appropriate entries into the
> readers.xml file and it would appear in the property panel. I’ve tried
> various things but they all look essentially like this:
>
> <!-- start TAB add -->
> <DoubleVectorProperty command="SetGamma"
> name="Gamma"
> default_values="1.4"
> number_of_elements="1"
> panel_visibility="default">
> <Documentation> Set Gamma </Documentation>
> </DoubleVectorProperty>
> <!-- end TAB add -->
>
> It compiles and runs but I don’t get an entry box. What am I missing? I
> am stumped for now so any help would be appreciated. I’ll hit it again
> next week.
> Thanks
> Tim
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170102/e2aca1be/attachment.html>
More information about the ParaView
mailing list