Dirty propagation and attributeAffects()

All nodes are required to specify which input attributes affect which output attributes using MPxNode::attributeAffects(). This information is used for dirty propation.

When an attribute changes, the dependency graph checks to see if that attribute affects any other attribute. If an attribute is affected, its plug is marked "dirty", meaning that the attribute value is stale and needs to be recomputed.

The connection from the dirty output plug is followed to the input plug it is connected to. That input plug is also marked dirty, and the plugs of any attributes it affects are also marked dirty. This process, referred to as dirty propagation, repeats until all the plugs in the graph that need to be recomputed are marked dirty. When the dependency node graph is recomputed, only the dirty plugs will be recomputed.