[GafferHQ/gaffer] f5ca50: MergeScenes : Reduce code duplication

0 views
Skip to first unread message

John Haddon

unread,
Dec 9, 2024, 5:43:35 AM12/9/24
to gaffer-...@googlegroups.com
Branch: refs/heads/1.5_maintenance
Home: https://github.com/GafferHQ/gaffer
Commit: f5ca501954f9aacc1cdefc9ce3fc1c03b0354218
https://github.com/GafferHQ/gaffer/commit/f5ca501954f9aacc1cdefc9ce3fc1c03b0354218
Author: John Haddon <thehad...@gmail.com>
Date: 2024-12-05 (Thu, 05 Dec 2024)

Changed paths:
M src/GafferScene/MergeScenes.cpp

Log Message:
-----------
MergeScenes : Reduce code duplication


Commit: dd1e11a09f29f95ed265f0233a00d08d7f595866
https://github.com/GafferHQ/gaffer/commit/dd1e11a09f29f95ed265f0233a00d08d7f595866
Author: John Haddon <thehad...@gmail.com>
Date: 2024-12-05 (Thu, 05 Dec 2024)

Changed paths:
M Changes.md
M src/GafferScene/MergeScenes.cpp

Log Message:
-----------
MergeScenes : Remove unnecessary temporary contexts

We're already in the right context to call `existsPlug()->getValue()` directly. Instead we were calling `exists()` which was constructing a new context identical to the one we already had.


Commit: 673d38488ee86f9a75ff0012ccf08e44ba85cdcb
https://github.com/GafferHQ/gaffer/commit/673d38488ee86f9a75ff0012ccf08e44ba85cdcb
Author: John Haddon <thehad...@gmail.com>
Date: 2024-12-06 (Fri, 06 Dec 2024)

Changed paths:
M Changes.md
M python/GafferSceneTest/MergeScenesTest.py
M src/GafferScene/MergeScenes.cpp

Log Message:
-----------
MergeScenes : Fix handling of inputs without a computed source

Examples of such an input might be a promoted plug that hasn't yet been connected to anything. In this case we were treating that input as active for every single location declared by the other inputs, and if it was the first input it would take precedence over the other inputs when in Keep mode. This would mean all attributes being lost from the location.

I did look into an alternative fix : defaulting `ScenePlug.exists` to false. But that caused problems for the Parent node when omitting the primary input and parenting children to `/`. There just is no good default value for `exists`; it should be true for the root and false for all other locations.


Commit: a6f44595d47568a074dfa3f1580deb9a53591581
https://github.com/GafferHQ/gaffer/commit/a6f44595d47568a074dfa3f1580deb9a53591581
Author: John Haddon <thehad...@gmail.com>
Date: 2024-12-09 (Mon, 09 Dec 2024)

Changed paths:
M Changes.md
M python/GafferSceneTest/MergeScenesTest.py
M src/GafferScene/MergeScenes.cpp

Log Message:
-----------
Merge pull request #6174 from johnhaddon/mergeScenesFixes

MergeScenes bugfix


Compare: https://github.com/GafferHQ/gaffer/compare/df8c4980fc4d...a6f44595d475

To unsubscribe from these emails, change your notification settings at https://github.com/GafferHQ/gaffer/settings/notifications
Reply all
Reply to author
Forward
0 new messages