detail.pythonalgorithm Module¶
- paraview.detail.pythonalgorithm.get_plugin_name(module_or_package)[source]¶
helper function called by vtkPVPythonAlgorithmPlugin to discover ParaView plugin name, if any.
- paraview.detail.pythonalgorithm.get_plugin_version(module_or_package)[source]¶
helper function called by vtkPVPythonAlgorithmPlugin to discover ParaView plugin version, if any.
- paraview.detail.pythonalgorithm.get_plugin_xmls(module_or_package)[source]¶
helper function called by vtkPVPythonAlgorithmPlugin to discover all “proxy” decorated classes in the module or package. We don’t recurse into the package, on simply needs to export all classes that form the ParaView plugin in the __init__.py for the package.
- paraview.detail.pythonalgorithm.load_plugin(filepath, default_modulename=None)[source]¶
helper function called by vtkPVPythonAlgorithmPlugin to load a python file.
- paraview.detail.pythonalgorithm.load_plugin_from_string(module_name, s)[source]¶
helper function called by vtkPVPythonAlgorithmPlugin to load python code from a string. This is used for C++ plugins that use python modules and include the python code in the .so
- paraview.detail.pythonalgorithm.reload_plugin_module(module)[source]¶
helper function to reload a plugin module previously loaded via load_plugin
- class paraview.detail.pythonalgorithm.smdomain[source]¶
Bases:
objectProvides decorators that add domains to properties.
- class paraview.detail.pythonalgorithm.smhint[source]¶
Bases:
objectProvides decorators that add hints to proxies and properties.
Bases:
objectProvides decorators to add functions, and proxies such as filters, to menus and toolbars in the ParaView GUI. These are categories of the filters menu (see ParaViewFilters in the plugin documentation) shown as menus of the menu bar.
menu is the name of the menu to add the item to, created if needed. Use / to separate the names of nested sub-menus, e.g. “My Tools/Advanced”. Plugins, including XML ones, can add items to the same menus.
When toolbar is True, the item is also added to a toolbar for the top-level menu, where sub-menus are shown as drop-down buttons.
When menubar is False, the top-level menu is added to the Filters menu instead of the menu bar, and its toolbar only has its own items.
Decorates a function to add it as an action to a menu (and optionally a toolbar). The function is called without arguments, using the GUI’s Python interpreter, when the action is triggered; after which, all views are rendered. The function must be defined at the module level of the plugin.
label defaults to the function’s name, and tooltip to the first line of its docstring. icon can be a Qt resource path, e.g. “:/pqWidgets/Icons/pqCalculator.svg”, or a file path.
Decorates a class, also decorated using smproxy.filter or smproxy.source, to add it to a menu (and optionally a toolbar). Triggering the item creates the filter, for the selected pipeline objects, or the source.
icon defaults to the icon from the proxy’s ShowInMenu hint, if any.
- class paraview.detail.pythonalgorithm.smproperty[source]¶
Bases:
objectProvides decorators for class methods that are to be exposed as server-manager properties in ParaView. Only methods that are decorated using one of the available decorators will be exposed be accessible to ParaView UI or client-side Python scripting API.
- class paraview.detail.pythonalgorithm.smproxy[source]¶
Bases:
objectProvides decorators for class objects that should be exposed to ParaView.