Ok, I realise I was approaching this in the wrong way. I have now moved all my logic from the getInternalValue / setInternalValue into the compute function and instead of referencing the internal values when drawing, I pull the information I need from the plugs of the node and that forces the update (though I could probably get away with doing this for just the outputs).
However, my attributeAffects seem to be more complicated than need be, so I'll just describe a psuedo example that illustrates this:
I have a node with three inputs I1, I2, I3 and three outputs A, B, C. The outputs can be accessed as an attribute of the node in maya of course. These three attributes are dependent on each other like this:
A -> B -> C (meaning if you want C, A must be computed first, then B and finally C)
So the ideal way to set up my attributeAffects would be like this:
CODE
attributeAffects(I1, A)
attributeAffects(I2, A)
attributeAffects(I3, A)
attributeAffects(A, B)
attributeAffects(B, C)
This doesn't seem to work though, I have to explicitly associate all of the inputs with all of the outputs, meaning that I have a add a load of new code in order to add an extra input for example. Is there a way of avoiding this?
PS. The devkit is quite extensive and I have used it before in the past, but is there a description of what each plug-in does and the kind of solutions it is demonstrating? Unless I become much more familiar with the library, there doesn't seem to be a simple way of finding the particular plug-in that solves a specific problem.