Add follow-data animation

This adds a new animation mode which will track a data object
as it moves during the animation. The cameras position and focal
point will be updated each time-step to keep the data at the center
of the view.

In order to make this change the vtkPVCameraCueManipulator class
now needs access to the vtkSMSourceProxy for the data to follow
so that it may get the bounds from the data information. This
necessitated moving the animation classes from ClientServerCore
to the ServerManager module.

Change-Id: I9d82f749d459bb7598a96f77dd5dbc049e9bfce3
Disable trace observers when tracing python state in cpstate.py

This is the same as the bugfix that was applied to smstate.py in
commit b27145eb9aa

Change-Id: I2e5cd64c1f224cc8b788a02e5f6008c59c0591e5
Make sure the paraview module is always initialized by pqPythonManager

If Python was initialized before the pqPythonManager was constructed then
the paraview module would not be imported as it is supposed to.  This
could happen if a startup plugin initialized Python before the
pqPythonManager is created, which can be the case with Python based
plugins.

Change-Id: I3a79547ce84d19773d95725e7fc1b7c6b99cb64c
Add a call to prompt() during the python shell startup

This prints the ">>>" prompt before printing the status message so that
the user will see:

>>> from paraview.simple import *

Change-Id: I477bf59677400bf2073b9812afe8c7558d2796ef
Don't print a newline when executing a python command in the console.

Printing a newline forced a new prompt to be printed even if the executed
python code did not generate any stdout.  The python console now uses
a flag this->Prompted to determien whether or not displaying the prompt
is required.

Change-Id: I8d28012b8281934961f2d8c78e91102b5f78c9f3
Execute python code in the context of the interactive console.

The function pqPythonShell::executeScript() is used to programmatically
execute python code.  This is used when running python scripts the user
selects with the Run Script button.  These should run in the console
context.

Code executed with vtkPythonInterpreter::RunSimpleString() will run in the
__main__ context which is now different from the ParaView python console.

The "from paraview.simple import *" statement is only executed in the
ParaView python console.

Change-Id: I5f957e6d60a6f77d37a6ed7c6b7cf1eec10fb517
Change the behavior of pqPythonShell::pushScript() to split over newlines

Previously, you could not paste multiline statements into the ParaView
python console.  This commit changes the behavior of the pushScript()
function so that it splits the script code over the newline character
and pushes each line separately.

This does change the behavior of entering multiline statements: previously
pushScript() would attempt to detect the indent and start the next line
using the indent of the previous line.  This behavior has been removed.

The new behavior closely matches the behavior of the standard commandline
python interpreter.

Change-Id: I899ec69194a1cce3d82cefc2f13048aad8f81fec
Move PVScalarBar/PVGL2PSExporter API to VTK superclasses.

These are moved as part of a fix for an export bug in GL2PS with
the new scalar bar actor class.

Change-Id: I367601e4dc96293eacf68f93ae4199c91cd59d41
Add a test for using the Python programmable filter with pvserver

Change-Id: I7413cba942cabc1bd9b5557964c7aa1224ca5750
Fix: in the programmable filter, delete the function before redefining it

This was a bug in the programmable filter.  If there was a syntax error
in the python script, then the python code that defined the RequestData
function (or other functions) would fail, and then the filter would
execute the previously defined version of the function.  The previously
defined version could have even been defined by a different programmable
filter.

In the future, the programmable filter could be refactored so that it
executes all code in a namespace (it could use the
vtkInteractivePythonConsole) which is cleaned up each time.  Currently,
it stores variables directly in the __main__ context.

Change-Id: Ieba0ca70396aa08fb7f8a8cc93aa4e2edc3f71c9
Fix the SetParameter API overloads of the vtkPythonProgrammableFilter

Commit fc8cabcd (April 2007) introduced a SetParameter function on the
programmable filter.  It added a string vector property to filter proxy
that could be used to set arbitrary parameter name/value pairs that would
be defined in the filter python script.

Commit 8311d712 (July 2011) introduced several SetParameter overloads so
that custom string, int, and double vector properties were supported.
This allowed proxy xml to declare custom properties on the python
programmable filter that would be presented in the GUI like regular
properties.  But, this commit also changed the behavior of the original
Parameter string vector property.

Commit 9176ba5c82 (March 2012) accidentally broke the SetParameter
overloads.

This commit (May 2013) fixes the SetParameter overloads and original
Parameter string vector property (but both cannot be used together).
This commit adds a test for the SetParameter API and adds an example
proxy xml file that demonstrates how to define a python programmable
filter with custom parameters.

Change-Id: I3583fbfdd7d9d442799c714bb2c34693d34ed2ea
Initialize Python before constructing the python console

Python was being initialized when executing code in the pqPythonShell
constructor. Instead, Python should be initialized explicitly by the
pqPythonManager before constructing the pqPythonDialog object.
The pqPythonShell does not need to handle the EnterEvent anymore.

Change-Id: Ib7d97929f989687194ab4a91f1fae6397eb4fc50
Remove pqPythonShell::initPythonInerpreter callback.

Now, the pyPythonManager calls pqPythonShell::setupInterpreter() after
the pqPythonShell has been created.  This way, the pyPythonShell does
not execute an python code in its constructor, but the pqPythonManager
guarantees that it is fully initialized after construction.

Executing python code in the constructor is bad because of the way stdout
is handled in a callback by the pqPythonManager, and using a timer to
initialize later is bad because the stdout won't be routed correctly
until after the timer callback.

This commit also removes the ExitEvent handling from the pyPythonShell
since ParaView only finializes Python once at exit, there is no need to
have a handler to reset the pyPythonShell.

Change-Id: Ib9b53f38f4b7fc558823dcb11c029554bd23828c
Remove unused methods in pqPythonManager

Change-Id: I6786ecfa3905e447c8926022f764cf2130067d63
Use the python main context instead of the interactive console for trace.

The record trace and trace state features can execute in the __main__
python context using vtkPythonInterpreter::RunSimpleString() instead
of executing in the context of the interactive console owned by the
pqPythonShell.

I can't think of a reason to prefer one context instead of the other, but
using the __main__ context simplifies the code in pqPythonManager.
In either case, the only variables written to the context is the imported
smtrace module name and the __smtraceString str object.

Change-Id: I5239067c9d95a27f9a5867fd075b4bc146c4da76
Remove the call to smtrace.print_trace from smstate.trace_state.

The print statement is unnecessary.  The trace is saved to a file, so the
printing is probably a remnant from development and debugging of smstate.

Change-Id: I626dcb1be4a745bec59e81e2b09e5824995107a5
Add the debug leaks view to ParaView

The debug leaks view is be shown as a top level widget on application
startup if the environment variable PV_DEBUG_LEAKS_VIEW is set.

pqPythonDebugLeaksView extends the vtkQtDebugLeaksView to add Python
capabilities to the debugger.  You can add references to tracked VTK
objects to the Python console for inspection.

Change-Id: I26918d9a499817ff5c75cef5dba82e5ba1de9ae7
Suppress Nektar warnings for overloaded virtual functions.

Change-Id: I7c16392e6ed8f07f2b0c848bafea35403805e20b
Add distributed Trivial producer for iPython use case.

Change-Id: Ie32bb4ae82b7c80f889dd5c304f247f1386a65e2
Adding option to load plugin at command line.

Two options are added to the command line namely --test-plugin and
--test-plugin-path. These will be used exclusively for loading and
testing individual plugins in paraview.

--test-plugin option takes the name of the plugin and loads it. The
  default plugin load paths are used with this option.

--test-plugin-path append the provided path to the actual search path.

Also adding two new cmake functions i.e add_client_plugin_tests and
add_client_server_plugin_tests which takes in Plugin name as an
additional option and passes it along with the --test-plugin command
line.

We are changing multiple plugin tests to use this options instead of
loading it in the test script. We also get rid of all xml code to load
the plugins from the test scripts.

Plugins have to be loaded on both client and server. The server-manager
on the client side typically helps load the plugin from default
location. However if the plugins were loaded from a different location
then the plugin-path needs to be specified not only at the client side
but also on the server side. This commit also achieves this.

The add_client[_server]_plugin test is extended to allow
plugin_path. The test driver is changed slightly to parse more options
sent to the server.

Change-Id: I15c26748979b280edae817cd34ea198cfe4a7bfe