Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata matching improvements #2536

Merged
merged 3 commits into from May 1, 2018

Conversation

johnhaddon
Copy link
Member

This implements the changes Daniel needs for #2508 and also removes the deprecated PlugValueWidget.registerCreator() method whose removal had been blocked by a similar problem. There are some legacy PlugValueWidget registrations in the IE codebase that will need updating. I can split this PR in two if you'd prefer to deal with those separately, but since this has been deprecated for years I think now might be the time...

- Don't allow '*' to match the '.' in a plug path. This mimics how '*' doesn't match '/' in a glob match or in the PathMatcher.
- Allow '...' to match any number of plug path elements, in the same way a PathMatcher does.

Breaking Change :

- Changed metadata wildcard matching rules.
This has been deprecated for almost 3 years, and recent improvements in metadata matching should have rendered it totally unnecessary. This removes one of the main hurdles in completing GafferHQ#707.

Breaking Change :

- Removed `PlugValueWidget.registerCreator()`. Use metadata instead.
@andrewkaufman andrewkaufman merged commit 4a3a4be into GafferHQ:master May 1, 2018
johnhaddon added a commit to johnhaddon/gaffer that referenced this pull request May 2, 2018
Fixes the following test failure :

```
======================================================================
FAIL: testSplineParameterUserDefaults (GafferOSLUITest.OSLShaderUITest.OSLShaderUITest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/john/dev/build/gaffer/python/GafferOSLUITest/OSLShaderUITest.py", line 110, in testSplineParameterUserDefaults
    self.assertEqual( s["parameters"]["spline"]["interpolation"].getValue(), Gaffer.SplineDefinitionInterpolation.Linear )
AssertionError: 1 != Gaffer._Gaffer.SplineDefinitionInterpolation.Linear
```

This appears to have been broken by GafferHQ#2536, which was pull-requested before the test was added, but merged after the test had been merged. Something to bear in mind if we keep PRs open for a long time - the Travis results are only valid at the point they were run, and aren't to be trusted after subsequent changes to master.
@johnhaddon johnhaddon deleted the metadataMatchers branch May 29, 2018 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants