This module is used to by the CoProcessingScriptGenerator plugin to aid in capturing ParaView state as CoProcessing python script.
This can capture the ParaView state in a Pipeline object that can then be used in CoProcessing scripts. The entry point into this module is the function DumpPipeline() which returns the Python trace script. Most of the other functions can be considered internal.
Also refer to paraview.cpexport Module which is used to generate a complete Python CoProcessing script that can be used with in a vtkCPPythonScriptPipeline.
paraview.cpstate.
ArrayAccessor
(varname, proxy)[source]¶Bases: paraview.smtrace.RealProxyAccessor
Augments traces of filters by defining names of arrays to be explored.
paraview.cpstate.
ClipAccessor
(varname, proxy)[source]¶Bases: paraview.smtrace.RealProxyAccessor
augments traces of clip filters with information to explore the parameter space for cinema playback (if enabled)
paraview.cpstate.
ContourAccessor
(varname, proxy)[source]¶Bases: paraview.smtrace.RealProxyAccessor
augments traces of contour filters with information to explore the parameter space for cinema playback (if enabled)
paraview.cpstate.
DumpPipeline
(export_rendering, simulation_input_map, screenshot_info, cinema_tracks, cinema_arrays)[source]¶Method that will dump the current pipeline and return it as a string trace - export_rendering : boolean telling if we want to export rendering - simulation_input_map: string->string map with key being the proxyname
while value being the simulation input name.
key -> view proxy name value -> [filename, writefreq, fitToScreen,
magnification, width, height, cinemacamera options]
key -> proxy name value -> argument ranges
key -> proxy name value -> list of array names
paraview.cpstate.
ProducerAccessor
(varname, proxy, simname)[source]¶Bases: paraview.smtrace.RealProxyAccessor
This accessor is created instead of the standard one for proxies that have been marked as simulation inputs. This accessor override the trace_ctor() method to trace the constructor as the CreateProducer() call, since the proxy is a dummy, in this case.
paraview.cpstate.
SliceAccessor
(varname, proxy)[source]¶Bases: paraview.smtrace.RealProxyAccessor
augments traces of slice filters with information to explore the parameter space for cinema playback (if enabled)
paraview.cpstate.
ViewAccessor
(varname, proxy, proxyname)[source]¶Bases: paraview.smtrace.RealProxyAccessor
Accessor for views. Overrides trace_ctor() to trace registering of the view with the coprocessor. (I wonder if this registering should be moved to the end of the state for better readability of the generated state files.
paraview.cpstate.
WriterAccessor
(varname, proxy)[source]¶Bases: paraview.smtrace.RealProxyAccessor
Accessor for writers. Overrides trace_ctor() to use the actual writer proxy name instead of the dummy-writer proxy’s name. Also updates the write_frequencies maintained in cpstate_globals with the write frequencies for the writer.
paraview.cpstate.
cp_hook
(varname, proxy)[source]¶callback to create our special accessors instead of the standard ones.
paraview.cpstate.
cpstate_filter_proxies_to_serialize
[source]¶Bases: object
filter used to skip views and representations a when export_rendering is disabled.
paraview.cpstate.
cpstate_globals
[source]¶cinema_arrays
= {}¶cinema_tracks
= {}¶export_rendering
= False¶screenshot_info
= {}¶simulation_input_map
= {}¶view_proxies
= []¶write_frequencies
= {}¶paraview.cpstate.
locate_simulation_inputs
(proxy)[source]¶Given any sink/filter proxy, returns a list of upstream proxies that have been flagged as ‘simulation input’ in the state exporting wizard.