Is it possible to show/hide toolbars in python scripts (macro) in Paraview?


I am trying to automate the visualization of data in Paraview by using the macro (python scripting). I was wondering if it would be possible to show/hide the toolbars (such as Main Controls, VCR controls, Pipeline Browser, Information, etc.) by using the macro (python script). I know I can hide all those toolbars in the GUI by a few clicks, but I hope to control them in the python scripts. I also tried to start a trace to record the actions, but it seemed to ignore the show/hide of toolbars.

Any suggestions will be appreciated.

Short answer, no, it is not supported by pvpython to control the GUI. Simply because pvpython can be used without a GUI at all.

Usually your usecase is covered by either using a dedicated Qt configuration file to setup the application automatically and statically, or by create a C++ Qt autostart plugin to setup the application dynamically.

That being said, you can still use pyQt to recover to Qt object and do whatever you want with it.
But this is not recommend and prone to break at any point if any change is made to the GUI.

Hi Mathieu, thank you so much for your help. That makes a lot of sense.

1 Like