Toolchefs / atomsGaffer

Atoms Crowd extension for Gaffer
https://atoms.toolchefs.com
27 stars 15 forks source link

Fix dirtying issues in affects() methods #44

Closed fdagenais-cinesite closed 3 years ago

fdagenais-cinesite commented 3 years ago

The affects() methods of the AtomsCrowdGenerator and AtomsCrowdClothReader nodes have been fixed by adding missing input plugs and a call to the base class in AtomsCrowdClothReader. In AtomsCrowdGenerator, most of the logic has been moved to the matching BranchCreator::affectsBranch...() method, since they are internally used by BranchCreator to dirty its internal plugs.

In Gaffer 0.58+, changes in the dirtying mechanism makes it important to have the behavior of affects() methods match the affects relationships of the hash/compute methods. Relationships not defined in affects() result in a failure to update the right outputs when an input plug is changed.

fdagenais-cinesite commented 3 years ago

Thank you for you comments @andrewkaufman.

My changes were blindly based on the hash methods, and as you pointed out a few of the plugs should have been removed from the hash instead of being added to the affect method. In the latest commit, I changed both the affect and hash methods based on the plugs used by their respective compute methods.