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

SceneAlgo : ObjectProcessor object history fix #5519

Conversation

ericmehl
Copy link
Collaborator

This fixes #5406 where the scene history was not taking into consideration the internal processedObjectPlug used by ObjectProcessor.

I'm not sure about the hard-coded handling of ObjectProcessor, perhaps some form of registry or new plug method would be better? I looked at the other nodes that are using an internal plug and I think this is the only one that is affected, so maybe a registry isn't warranted just yet?

Checklist

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable.
  • I have tested my change(s) in the test suite, and added new test cases where necessary.
  • My code follows the Gaffer project's prevailing coding style and conventions.

@ericmehl ericmehl force-pushed the sceneAlgo-object-history-internal-plug branch from ce6e312 to e4410a8 Compare October 31, 2023 21:01
Copy link
Member

@johnhaddon johnhaddon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Eric, great to have this one fixed!

maybe a registry isn't warranted just yet?

Yeah, I think that's a good call. I don't think we know enough about how to parameterise any potential registry yet.

Comment on lines 502 to 503
( plug->parent<ScenePlug>() && plug->getName() == m_scenePlugChildName ) ||
( (Gaffer::TypeId)plug->typeId() == Gaffer::TypeId::ObjectPlugTypeId && plug->getName() == g_processedObjectPlugName )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we put this conditional in a little inline shouldCapture( const Plug * ) function, and then use !shouldCapture() in processStarted()? The logic seems subtle enough and likely enough to get out of sync that it might be worth not transposing the individual elements to the negative in processStarted().

I wonder if we should also check that plug->parent<ObjectProcessor>() in the __processedObject case?

Copy link
Collaborator Author

@ericmehl ericmehl Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely an improvement, fixed and squashed in to cd91b2d

Changes.md Outdated
@@ -22,6 +22,7 @@ Fixes
- Fixed a bug preventing anything except strings from being copied and pasted.
- Fixed likely cause of crash when resizing Spreadsheet column width (#5296).
- Reference : Fixed rare reloading error.
- SceneAlgo : Fixed computation of `ScenePlug.object` in networks with nodes derived from `ObjectProcessor`. These include : `CameraTweaks`, `ClosestPointSampler`, `CollectPrimitiveVariables`, `CopyPrimitiveVariables`, `CurveSampler`, `DeleteCurves`, `DeleteFaces`, `DeletePoints`, `MapOffset`, `MapProjection`, `MeshDistortion`, `MeshNormals`, `MeshSegments`, `MeshTangents`, `MeshToPoints`, `MeshType`, `Orientation`, `PointsType`, `PrimitiveSampler`, `PrimitiveVariables`, `ReverseWinding`, `ShufflePrimitiveVariables` and `UVSampler`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to mention the issue number here, and also put "Fixes #..." in the commit message.

Copy link
Collaborator Author

@ericmehl ericmehl Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed and squashed into cd91b2d

@ericmehl ericmehl force-pushed the sceneAlgo-object-history-internal-plug branch from e4410a8 to 823b997 Compare November 1, 2023 21:13
@ericmehl
Copy link
Collaborator Author

ericmehl commented Nov 1, 2023

Great! Those two items are addressed and squashed down into cd91b2d. Ready for another hopefully quick look and squash.

@ericmehl ericmehl force-pushed the sceneAlgo-object-history-internal-plug branch from 823b997 to cd91b2d Compare November 1, 2023 21:43
@johnhaddon johnhaddon merged commit bff4815 into GafferHQ:1.3_maintenance Nov 2, 2023
4 checks passed
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