Removed unused (and unimplemented) Gadget constructor.
Adopted new Python wrapping mechanism from Cortex.

This allows us to avoid a great deal of overhead when wrapped classes are created from Python but not subclassed.
Optimised Wrapper isInstanceOf() implementations for common cases.
Fixed test cases for wrapping changes.

Prior to this, a lot of unnecessary wrapping and garbage collection for wrapped-but-not-subclassed objects meant that we could use "is", but now we must use ".isSame()" to work around object identity problems. That's the price we pay for improved performance in this case. Note that in general ".isSame()" has always been necessary for RefCounted types, and we were just lucky that the particular types used in those tests had been wrapped before.
Fixed test by removing member injection from non-wrapped class.

With the new optimisations in the wrappers, we can only expect object identity to be preserved for wrapped classes subclassed in Python.
Removed bad RefCounted.isSame( bool ) from NameLabel.

For some reason we were getting away with this when the isSame() binding accepted RefCountedPtr, now that it takes RefCounted * our blatant mistake is being pointed out to us.
Fixed crash in GraphGadget destruction.

This one is quite interesting. The GraphGadget stores its root node with a smart pointer in m_root. If noone else has a reference to the root, then the root node is deleted during the destruction of the GraphGadget. Prior to our wrapper changes this wouldn't occur immediately because the ScriptNode would require garbage collection by IECore::WrapperGarbageCollector - this essentially delayed actual destruction of the root until well after the GraphGadget was destructed fully.

Now the root is deleted immediately. While it is doing this, it removes all its children, which in turn remove all their connections, which in turn signal to the GraphGadget that something has changed. But the GraphGadget is destructing, so it blows up trying to deal with the signal. But surely all the signals should be disconnected from the GraphGadget automatically on destruction, because it derives from boost::signals::trackable? Well sure, but that will only happen when the trackable base class destructor is called, which is /after/ GraphGadget has destructed - so too late. The solution is to use scoped_connections to store the connection. These are stored in m_nodeGadgets, which is guaranteed to be destructed before m_root (members destruct in reverse order of initialisation). This ensures GraphGadget is disconnected from all signals before m_root dies, and GraphGadget can die in peace.
Added workaround for crash in InteractiveRenderManRenderTest.

The comments describe the situation whereby the InteractiveRenderManRender node was evaluating the scene while the connections were in an invalid intermediate state. This was actually occurring during the destructor for the ScriptNode containing the renderer, which removes all children (and therefore their connections). That destructor is now triggered much earlier because it no longer requires garbage collection, unmasking a problem which has existed all along.

The comment also describes a proper fix for the problem which we should implement when time allows.
Fixed the ImageView swatches so that they draw correctly when no alpha is present.
Replaced calculations between "Down Y" and "Format" space with calls to Format::yDownToFormatSpace().
Fixed some bugs when using negative display windows.
Fixed bugs when reformatting one image with a negative format to another.
Fixed the expected output of a test case which was wrong.
Validated the results against the result of a similar operation in other software.
Removing parameter handling from ObjectReader.

We want to ditch this class in the future anyways, and the current approach did not handle context varying fileNames, nor was it threadsafe.
SceneReaderPathPreview supports Alembic and most IECore.Reader files.

Also added OpenGLAttributes node to force GL points and curves.
SceneReaderPathPreview now supports SequencePaths with valid extensions.

It tries to set the frame range based on the FrameList of the FileSequence.
Focusing the viewer when the new plug is connected.
Replacing ReaderPathPreview with ImageReaderPathPreview.

Since most readers are now handled by the SceneReaderPathPreview, we don't need a second preview mode for them.
PathPreviewWidget now respects registration order.

This generally results in PathPreviewers being ordered from least to most specific.
Merge pull request #771 from johnhaddon/typeIdOptimisations

Optimised Wrapper isInstanceOf() implementations for common cases.
Added GafferImage::ImageWriter::acceptsInput() method.
Exposing an ObjectPreview node.

This simplifies other code which might want to mimic the preview behaviour (as with the _Camera node)