[Paraview] Question about adding Widget to property panel

Beach, Timothy A. (GRC-LTE0)[Vantage Partners, LLC] timothy.a.beach at nasa.gov
Thu Dec 29 18:56:41 EST 2016


 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 



More information about the ParaView mailing list