ShaderAssignment shader plug on left hand side #693
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).