[Paraview] Object Inspector Tabs

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Fri Aug 5 10:19:29 EDT 2011


Try to locate vtkMyRepresentationClientServer.cxx file in the binary
directory. Was that generated? Open and see if it include a condition
for "SetSomeBoolVar" in it.

Utkarsh

On Fri, Aug 5, 2011 at 10:07 AM, Panneton, Brian C USA CTR (US)
<brian.c.panneton.ctr at mail.mil> wrote:
> Yes, this is what I have for ADD_PARAVIEW_PLUGIN
>
> [code]
> ADD_PARAVIEW_PLUGIN(MyPlugin "1.0"
>    SERVER_MANAGER_XML plugin/MyPlugin.xml
>    SERVER_MANAGER_SOURCES
>        vtkReader/vtkMyReader.cxx
>        representations/vtkMyRepresentation.cxx
>    GUI_RESOURCE_FILES plugin/MyPluginGUI.xml
>    GUI_INTERFACES ${IFACES}
>    SOURCES panel/MyReaderPanel.cxx
>            ${MOC_SRCS} ${IFACE_SRCS}
>            ${RCS_SOURCES} ${UI_BUILT_SOURCES}
> )
> [/code]
>
> For my ProxyGroup representations XML I have this:
>
> [code]
> <ProxyGroup name="representations">
>        <RepresentationProxy name="MyRepresentation"
>            class="vtkMyRepresentation"
>            processes="client|renderserver|dataserver"
>            base_proxygroup="representations"
>            base_proxyname="SurfaceRepresentation">
>
>               <IntVectorProperty
>                  name="GlyphLegend"
>                  command="SetSomeBoolVar"
>                  number_of_elements="1"
>                  default_values="1">
>                 <BooleanDomain name="bool"/>
>              </IntVectorProperty>
>        </RepresentationProxy>
>
>        <Extension name="GeometryRepresentation">
>            <RepresentationType subproxy="MyRepresentation"
>                text="My Mapper" subtype="Surface" />
>
>            <SubProxy>
>                <Proxy name="MyRepresentation"
>                    proxygroup="representations"
>                    proxyname="MyRepresentation">
>                </Proxy>
>                <ShareProperties subproxy="SurfaceRepresentation">
>                    <Exception name="Input" />
>                    <Exception name="Visibility" />
>                    <Exception name="Representation" />
>                </ShareProperties>
>            </SubProxy>
>        </Extension>
>    </ProxyGroup>
> [/code]
>
>
> Then in vtkMyRepresentation I have a setter and getter for SetSomeBoolVar(int) and GetSomeBoolVar().
>
> I also have a ProxyGroup for sources but I didn't think that would conflict.
>
> Thanks,
> Brian
>
>
> ________________________________________
> From: Utkarsh Ayachit [utkarsh.ayachit at kitware.com]
> Sent: Friday, August 05, 2011 9:54 AM
> To: Panneton, Brian C USA CTR (US)
> Cc: ParaView
> Subject: Re: [Paraview] Object Inspector Tabs
>
> What's your CMakeLists. txt file? Was vtkMyRepresentation specified as
> SERVER_MANAGER_SOURCES in the ADD_PARAVIEW_PLUGIN call?
>
> Utkarsh
>
>
> On Thu, Aug 4, 2011 at 5:00 PM, Panneton, Brian C USA CTR (US)
> <brian.c.panneton.ctr at mail.mil> wrote:
>> Okay, so instead of adding tabs like Properties, Display and Information, I created a Qt TabWidget which possibly does what I want but I am not sure.
>>
>> Right now, on my custom panel, I have options that modify the input to my reader. I am looking to also add options to modify part of my custom representation. Am I able to do this from my current custom panel? How would the XML look?
>>
>> I tried setting up my SMC as such without luck:
>> [code]
>> <ServerManagerConfiguration>
>>  <ProxyGroup name="representations">
>>   <RepresentationProxy name ... class="vtkMyRepresentation" ..>
>>    ... < { properties defined here such as intvectorproperty} > ...
>>    </RepresentationProxy>
>>  </ProxyGroup>
>>  <ProxyGroup name="sources">
>>    <SourceProxy name ... class="vtkMyReader" ..>
>>    ... < { properties defined here } > ...
>>    </SourceProxy>
>>  </ProxyGroup>
>> </ServerManagerConfiguration>
>> [/code]
>>
>> But this will end up giving me the error even though I have a vtkMyRepresentation::SetMyProperty(int) in the source:
>> [code]
>> vtkPVSessionCore (0x16e71130): Object type: vtkMyRepresentation, could not find requested method: "SetMyProperty"
>> or the method was called with incorrect arguments.
>>
>> while processing
>> Message 0 = Invoke
>>  Argument 0 = vtk_object_pointer {vtkMyRepresentation (0x1829dfb0)}
>>  Argument 1 = string_value {SetMyProperty}
>>  Argument 2 = int32_value {1}
>> [/code]
>>
>> Any ideas?
>>
>> Thanks,
>> Brian
>> ________________________________________
>> From: Utkarsh Ayachit [utkarsh.ayachit at kitware.com]
>> Sent: Thursday, August 04, 2011 12:09 PM
>> To: Brian C. Panneton (CONTR)
>> Cc: paraview at paraview.org
>> Subject: Re: [Paraview] Object Inspector Tabs
>>
>> Nope, this is not possible through plugins yet. You can add a
>> brand-new dock widget through plugins but not add a new tab to the
>> Object Inspector widget.
>>
>> Utkarsh
>>
>> On Thu, Aug 4, 2011 at 11:56 AM, Brian C. Panneton (CONTR)
>> <brian.c.panneton.ctr at us.army.mil> wrote:
>>> I was wondering if there was an example of how to add a new tab to the
>>> Object Inspector for a plugin. I remember being told that it is possible,
>>> but I can't seem to find any examples.
>>>
>>> Thanks,
>>> Brian Panneton
>>> _______________________________________________
>>> 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