If you have been using ParaView for a while, you have no doubt encountered at least one of these dialogs:
While both configure how images were saved out from ParaView, they unfortunately offer different set of options. Notably, when saving animation dialog doesn’t have options to save a single view (it always saves all views in the app), or change the color palette. Furthermore, the Python API for both of these operations is inconsistent and lacking features. For example, despite having means to change the color palette in the UI, the Python API to SaveScreenshot has no mechanism to do that. Also, one could not simply request an image of specific resolution using the Python API, but instead as a magnification factor of the current view size — which was a major inconvenience, in my opinion.
Changes slated to be available in the next release of ParaView (version 5.4) address these issues. Here are the new versions of these two dialogs:
It is fairly obvious that both have similar options with a few more animation specific parameters in the Save Animation Options dialog. Some of the other salient features of this change are as follows:
Separator Options: when saving multiple views in the active tab (or layout), you can specify a separator width and color directly from this dialog. In the previous versions, these options were configured from the Settings dialog. They have been removed from Settings, and now available when saving images/movies.
Transparent Background: when saving PNGs, this option allows you to save out images with transparent background. This option, like separator options, has moved from Settings dialog, making it more obvious and available when you need it.
Python API: Besides the UI, the Python API too has got a face lift. As always, the easiest way to learn the new Python API is to use Python Tracing capabilities in the UI. Choose options in the dialog as you like, and the trace will generate the script to do the same in Python. These include simple.SaveScreenshot and simple.SaveAnimation functions. simple.WriteImage and simple.WriteAnimation while still supported are now deprecated and it’s strongly suggested that you update your Python code to use the new methods. Likewise, old arguments to simple.SaveScreenshot which include magnification are also supported, but cannot be used together with the new options. See the ParaView Python API docs for details.
C++ API: These changes have some impact on the C++ API for custom applications. Please check the major API changes page for details and feel free to use the mailing list if you have any issues with porting old code.