ImageEngine/gaffer — pull request #693 by johnhaddon (2013-12-16 18:03:01+00:00)
Title: ShaderAssignment shader plug on left hand side

This pull request implements #82 - placing the shader plug on the left hand side of the ShaderAssignment node in the NodeGraph. It allows all other node types to request similar specific positioning using a "nodeGadget:nodulePosition" Metadata entry. This necessitated reimplementing the Metadata class in C++ rather than Python, which we've needed for a while anyway. Since #157 was just waiting on that, I threw it in there as well.

I'm not entirely pleased with the way string matching is going in the API at the moment. Some of the factories (Nodule for instance) accept strings which are treated as regexes, others accept strings which are treated as fnmatch() patterns (PlugValueWidget for instance), and our string matching for the PathFilter uses something similar to fnmatch. Metadata was also using strings as fnmatch patterns, so I've had to implement a conversion to regexes on the way into C++ - this keeps compatibility with the existing python code but adds another permutation to what we've already got. I'd like to refactor all the string matching to use identical code at some point - does making a ticket for that seem reasonable? Currently I'm thinking that although regexes are powerful, glob style matching is actually better because it's easier to use for the average person (I certainly have difficulty reading more than the most basic regexes).