[Paraview] Trouble with "information_only" GUI property in paraview filter

Yumin Yuan yumin.yuan at kitware.com
Fri Jun 8 16:28:17 EDT 2012


Hi Alex,

If you can debug into pqNamedWidgets::createWidgets(), and see where
and why this property is being skipped, it will help to narrow down
the problem, especially around this piece of logic (starting with line
892).


    // skip information properties
    if((!propertiesToShow.contains(propertyName) && informationOnly) ||
        SMProperty->GetIsInternal())
      {
      continue;
      }

    vtkPVXMLElement *hints = SMProperty->GetHints();

    // skip non-summary properties if summaryOnly is true
    if(summaryOnly && (!hints ||
hints->FindNestedElementByName("ShowInSummaryPanel") == 0))
      {
      continue;
      }


HTH,
Yumin

On Fri, Jun 8, 2012 at 3:57 PM, Alex Rattner <Alex.Rattner at gatech.edu> wrote:
> Hi Yumin,
>
> Thank you for the response. I tried this and still no luck, the property
> still won't appear. For reference, my new xml was
>
> <IntVectorProperty
>   name="NumberOfFeatures"
>   label="Num Features"
>
>   command="GetNumFeatures"
>   number_of_elements="1"
>   default_values="0"
>   information_only="1"
>   show="1">
>
> <Documentation>
>      Number of features in the field.
> </Documentation>
> </IntVectorProperty>
>
> I'm pretty sure that the property is actually being made and called, because
> I debugged paraview and found that the GetNumFeatures method was being
> called. It just seems that the property isn't being displayed. Could this
> really be a bug in paraview?
>
> Thanks,
> Alex
>
>
> On 06/08/2012 01:22 PM, Yumin Yuan wrote:
>>
>> Hi Alex,
>>
>> You can add the following to your xml to see if it helps.
>>
>> show="1"
>>
>> If this property does show up after adding that, it should be
>> displayed as disabled since it is read-only. If it does not help, this
>> could be a bug.
>>
>> Yumin
>>
>> On Fri, Jun 8, 2012 at 2:40 PM, Alex Rattner<Alex.Rattner at gatech.edu>
>>  wrote:
>>>
>>> Hello,
>>>
>>> I have been developing a feature tracking filter plug-in for paraview for
>>> a
>>> couple weeks. I am currently trying to improve the plug-in GUI, but ran
>>> into
>>> an issue.
>>>
>>> I want the plug-in to return some basic information to the user in the
>>> GUI,
>>> so I added a property to the server xml file like:
>>>
>>> <IntVectorProperty
>>>   name="NumberOfFeatures"
>>>   label="Number Of Features"
>>>   command="GetNumFeatures"
>>>   number_of_elements="1"
>>>   default_values="0"
>>>   information_only="1">
>>> <Documentation>
>>>      Number of features in the field.
>>> </Documentation>
>>> </IntVectorProperty>
>>>
>>> with corresponding code in the class definition:
>>> vtkGetMacro(NumFeatures, int);
>>>
>>> However, the property does not appear on the plug-in gui. Similar "input"
>>> GUI properties work fine,  but I've been messing around for a couple
>>> hours
>>> and I cannot get this "output" GUI property to appear. Is this specific
>>> to
>>> the "filters" ProxyGroup - because I have found other plug-ins that use
>>> essentially the same xml code to output information? Do you have any
>>> suggestions on how to make such output properties display and work?
>>>
>>> Thanks,
>>> Alex
>>> _______________________________________________
>>> 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
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.paraview.org/mailman/listinfo/paraview
>
>


More information about the ParaView mailing list