Skip to content

Conversation

@danieldresser-ie
Copy link
Contributor

Working on top of #6717, remove any other remaining compatibility configs targeting files from Gaffer 0.40 and earlier.

Just putting up a first pass on this for discussion.

My process here was just to run gitk startup/*/*Compatibility.py and scroll back to the beginning of the log to find compatibility configs created before 2018, and then quickly audit them to make sure their purpose hadn't changed since.

The choice of 0.40 as a cutoff is pretty arbitrary - I guess we'd discussed it just because that was the vintage of the spline compatibility shim I wanted to remove to reduce confusion with the new shim. If we wanted to extend this a bit farther into 2018, the next major ones on the chopping block would be supporting CompoundPlug, and support PathMatcherData from before it moved to Cortex ... any thoughts on where a logical demarcation would be?

Linear splines in OSL only need 1 extra endpoint. This test had linear splines with 2 extra endpoints, because it started from a Cortex representation that already had an extra endpoint - that's conceptually wrong, IECore::Spline only uses duplicate end points for curve types where it is required for evaluation, not for linear.
Previously, connections to color components in OSL shaders would fail in 3Delight
IECoreScene::ShaderNetworkAlgo::expandSplineParameters was the deprecated way to handle spline parameters.

IECoreArnold::ShaderNetworkAlgo is now doing the up to date approach - there is a call to IECoreScene::ShaderNetworkAlgo::convertToOSLConventions in preprocessedNetwork, which will have already converted splines. As far as I can tell, this means that expandSplineParameters was currently not doing anything, and the fact it was still being called was simply an oversight.
@johnhaddon
Copy link
Member

any thoughts on where a logical demarcation would be?

I'd be quite happy to leave it at 0.40 for now. I'm sure a case can be made to go further, but I'd rather not have to think too much about possible unexpected downsides right now. It feels nice to be making a bit of progress, but without pushing further than required by the spline work for now...

@johnhaddon
Copy link
Member

Oh, and LGTM.

@danieldresser-ie
Copy link
Contributor Author

I've now added 3 commits modifying tests to get them passing - this does emphasize that while any scripts saved after 2017 shouldn't have these problems, it is possible for any code to have them, even code written recently ( for example, someone setting a Color4f plug with a Color3f value is something someone writing Python pipeline code could have done recently ). The fixes are straightforward, so this is probably fine, but it will be something to be aware of when it comes time to roll this out, and we probably should be quite explicit in the changelog.

I'm thinking something like:

Breaking

  • Removed compatibility shims intended to support Gaffer scripts saved with Gaffer 0.40 or earlier ( released in 2017 ). It is possible that some old pipeline code could still be using these old names, but the migration path is very straightforward:
    • GafferImage :
      • No longer accept the deprecated filter name "catrom" in place of "catmull-rom" in Resize and ImageTransform.
      • Channel masks plugs no longer accept StringVectorData ( they should be space separated strings ).
      • Grade plugs no longer accept Color3f values ( they should be Color4f ).
      • The ImageStats "area" plug no longer accepts the alternate name "regionOfInterest".
      • The VectorWarp "vector" plug no longer accepts the alternate name "uv".
    • GafferScene :
      • The SetFilter "setExpression" plug no longer accepts the alternate name "set".
      • MapProjection and MapOffset no longer try to support separate "s" and "t" primitive variables ( they expect a V2f ).
      • The GafferSceneUI::SceneView "drawingMode" plug no longer accepts the alternate name "baseState".

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.

2 participants