ImageEngine/gaffer — pull request #1054 by andrewkaufman (2014-10-17 23:54:18+00:00)
Title: Redesigned Dispatcher Registration

It now behaves more like our other registries, as discussed in #922.

I've also added `setDefaultDispatcher()` and `getDefaultDispatcher()`, though they aren't actually used by the `DispatcherWindow` as we originally intended. This is because the window needs a matching label, and that isn't available...

A nice side effect of `DispatcherWindow` managing it's own list of dispatchers is that users can create ad-hoc dispatchers, call `DispatcherWindow.setDispatcher( dispatcherType, dispatcher )` and it becomes available from the dropdown already, without needing to register an official creater with `Gaffer::Dispatcher`.

One thing I don't like is the impact on `doSetupPlugs()`. I mentioned the problem on #922, but for now I've gone with creating all the dispatchers. This means that every time we create an `ExecutableNode` we also re-create and destroy all the registered dispatchers, just so we can call `doSetupPlugs()`, which is unfortunate... the only other option I could think of was making `doSetupPlugs()` static and finding the possible Dispatchers using ` IECore.RunTimeTyped.derivedTypeIds( Gaffer.Dispatcher.staticTypeId() )`, but then I didn't know how to recover the actual class from that to call the static method.