ImageEngine/gaffer — pull request #786 by johnhaddon (2014-03-13 11:01:17+00:00)
Title: Improved SceneInspector shader display and shader handles

This improves the display of shaders in the SceneInspector as requested for #335, and also improves the usability of the shader handles generated when creating shader networks - they are now repeatable for a given network and include the name of the node which generated the shader.

I suspect that sooner or later someone will ask for the full path to the node rather than just the name to help identify nodes in Boxes, and I do think this would be preferable, but we don't have the necessary signalling machinery to keep this easily updated at the moment. I think we could add a GraphComponent::fullNameChangedSignal(), but I don't want to do that until we're only constructing signals for the GraphComponent classes in a lazy fashion - signal construction is already showing up as a decent overhead following our recent optimisations (about 5% of total script load time), and also takes a fair chunk of memory and has overhead even when emitting signals without slots attached. This would be exacerbated by a fullNameChangedSignal(), particularly as the naive implementation would traverse the whole hierarchy down when a name changed somewhere. If we had a lazy implementation that only signalled when the signal had been accessed (and lazily constructed) I think this overhead would be much more acceptable, particularly as we have few other use cases for it at present...