# How to access to a plugin properties panel?

**URL:** https://discourse.paraview.org/t/how-to-access-to-a-plugin-properties-panel/2720
**Category:** Development
**Tags:** python
**Created:** [October 8, 2019, 11:49am UTC](https://discourse.paraview.org/t/how-to-access-to-a-plugin-properties-panel/2720 "2019-10-08T11:49:52Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Loic](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/l/e9c0ed/32.png) [@Loic](https://discourse.paraview.org/u/Loic)
#### Post date: [October 8, 2019, 11:49am UTC](https://discourse.paraview.org/t/how-to-access-to-a-plugin-properties-panel/2720/1 "2019-10-08T11:49:52Z")

</div>

Hi,

I would like to develop a plugin based on VTKPythonAlgorithmBase.  
This plugin take as input a vtkDataset and 3 coordinates representing the position of a camera.

With the following code, I’ve managed to expose these 3 coordinates in Paraview’s properties panel:

```python
    @smproperty.doublevector(name="Camera", default_values=[1, 1, 1], label="Camera")
    @smdomain.doublerange()
    def Set1_Camera(self, x, y, z):
        value = np.r_[x, y, z]
        if not np.allclose(self._camera, value) :
            self._camera = value
            self.Modified()

```

I also succeed in adding a button which prints the position of the camera in the output window:

```python
    @smproperty.xml('''<Property name="Print Camera Position" command="CameraButton" panel_widget="command_button"></Property>''')
    def CameraButton(self, *args):
        import paraview.simple
        camera = paraview.simple.GetActiveCamera()
        print('Camera position : ', camera.GetPosition())  

```

Instead of printing the camera position in the output window, I would like to fill the properties panel with these values.  
How can I access to theses properties from the CameraButton function ?

Thanks for your help,

Regards,

Loic

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [October 8, 2019, 7:10pm UTC](https://discourse.paraview.org/t/how-to-access-to-a-plugin-properties-panel/2720/2 "2019-10-08T19:10:19Z")

</div>

> [@Loic](#):
>
> I also succeed in adding a button which prints the position of the camera in the output window:

This is incorrect! One should not access paraview.simple module in the algorithms like so. I won’t go into details, but this is a big no-no in client-server configurations.

There’s no way to support this the way you’re implementing. The only reasonable solution would be add a custom property widget for the SetCamera property that then uses a custom `pqPropertyWidget` subclass that can access the active view and camera from the client side and then set the value to it. That will require C++ code, however, and cannot be done simply in `VTKPythonAlgorithmBase` subclass.

---

<div class="post-metadata">

### Author: ![CsatiZoltan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/csatizoltan/32/6997_2.png) [@CsatiZoltan](https://discourse.paraview.org/u/CsatiZoltan)
#### Post date: [July 10, 2026, 8:42am UTC](https://discourse.paraview.org/t/how-to-access-to-a-plugin-properties-panel/2720/3 "2026-07-10T08:42:05Z")

</div>

> [@utkarsh.ayachit](#):
>
> One should not access paraview.simple module in the algorithms like so. I won’t go into details, but this is a big no-no in client-server configurations.

Could someone explain to me the reason? I develop Python algorithms (subclassing `VTKPythonAlgorithmBase`) that partially rely on `paraview.simple`. I faced one problem only (although I haven’t tested it in client-server mode yet): using `Show` in `RequestInformation` or `RequestData` leads to infinite recursion. On the other hand, I can use `Show` from a separate method, e.g. a method decorated with an XML property that creates a push button in the Properties panel. So which functions should we avoid using in a Python plugin? After a discussion with Kitware, I learnt that it is better that a Python algorithm only deals with the data management, not the GUI functionalities. But I would like to understand why this is the case.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 10, 2026, 8:43am UTC](https://discourse.paraview.org/t/how-to-access-to-a-plugin-properties-panel/2720/4 "2026-07-10T08:43:49Z")

</div>

> [@CsatiZoltan](#):
>
> I would like to understand why this is the case.

It is a core design principle of ParaView.

server side handle data. Programmable filter are run server side.  
client side handle UI. Python scripts are run client side.

---

<div class="post-metadata">

### Author: ![CsatiZoltan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/csatizoltan/32/6997_2.png) [@CsatiZoltan](https://discourse.paraview.org/u/CsatiZoltan)
#### Post date: [July 10, 2026, 8:55am UTC](https://discourse.paraview.org/t/how-to-access-to-a-plugin-properties-panel/2720/5 "2026-07-10T08:55:51Z")

</div>

Thank you. So it means that I should separate the functionalities into two: one `VTKPythonAlgorithmBase`-based plugin that does not rely on the client and a Python script that does the automations in the ParaView GUI.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [July 10, 2026, 8:56am UTC](https://discourse.paraview.org/t/how-to-access-to-a-plugin-properties-panel/2720/6 "2026-07-10T08:56:24Z")

</div>

Yes
