simple.plugin Module¶
- paraview.simple.plugin.LoadCustomFilters(filename, ns=None)[source]¶
Loads a custom filter XML file and updates this module with new constructors if any. If you loaded the simple module with
from paraview.simple import *
, make sure to passglobals()
as an argument.- Parameters:
filename (str) – Path to XML file with custom filter definitions.
ns (dict) – Namespace in which new functions will be loaded. Optional, defaults to None.
- paraview.simple.plugin.LoadDistributedPlugin(pluginname, remote=True, ns=None)[source]¶
Loads a plugin that’s distributed with the ParaView executable. This uses the information known about plugins distributed with ParaView to locate the shared library for the plugin to load.
- Parameters:
pluginname (str) – Short name of the plugin (not a file path)
remote (bool) – If True, loads the plugin on the server unless the connection is not remote. If False, loads the plugin on the client. Optional, defaults to True.
ns (dict) – Namespace in which new functions will be loaded. Optional, defaults to None.
- Raises:
RuntimeError – If the plugin was not found.
- paraview.simple.plugin.LoadPlugin(filename, remote=True, ns=None)[source]¶
Loads a ParaView plugin and updates this module with new constructors if any. The remote argument (default to
True
) is to specify whether the plugin will be loaded on the client (remote=False
) or on the server (remote=True
).If you loaded the simple module with
from paraview.simple import *
, make sure to passglobals()
as an argument:LoadPlugin("myplugin", False, globals()) # to load on client LoadPlugin("myplugin", True, globals()) # to load on server LoadPlugin("myplugin", ns=globals()) # to load on server
Otherwise, the new functions will not appear in the global namespace.
- Parameters:
filename (str) – Path to the plugin to load.
remote (bool) – If True, loads the plugin on the server unless the connection is not remote. If False, loads the plugin on the client. Optional, defaults to True.
ns (dict) – Namespace in which new functions will be loaded. Optional, defaults to None.
- Returns:
None
- paraview.simple.plugin.LoadPlugins(*args, **kwargs)[source]¶
Loads ParaView plugins and updates this module with new constructors if any. The remote keyword argument (default to
True
) is to specify whether the plugin will be loaded on client (remote=False
) or on server (remote=True
). Proxy definition updates are deferred until all plugins have been read, which can be more computationally efficient when multiple plugins are loaded in sequence.If you loaded the simple module with
from paraview.simple import *
, make sure to passglobals()
as a keyword argument:LoadPlugins("myplugin1", "myplugin2", remote=False, ns=globals()) # to load on client LoadPlugins("myplugin", "myplugin2", remote=True, ns=globals()) # to load on server LoadPlugins("myplugin", "myplugin2", ns=globals()) # to load on server
Otherwise, the new functions will not appear in the global namespace.
Note, remote=True has no effect when the connection is not remote.
- paraview.simple.plugin.LoadXML(xmlstring, ns=None)[source]¶
Given a server manager XML as a string, parse and process it. If you loaded the simple module with
from paraview.simple import *
, make sure to passglobals()
as the second arguments:LoadXML(xmlstring, globals())
Otherwise, the new functions will not appear in the global namespace.
- Parameters:
xmlstring (str) – XML string containing server manager definitions.
ns (dict) – Namespace in which new functions will be defined. Optional, defaults to None.