Thanks your reply, Joojaa. I have some detail question about the pseudocode you provide:
If(this plug is accessed){ <--- the plug you mention only limited to output plug or all possible in&out plug ?
getTheValueOfRelevantInput();
makeRelevantPlugsClean();
<--- the relevant plug not only defined by attributeAffect, but also plugs that has connections with accessed plug ?
}
To simply the situation this time i use only two node for testing(The same as before, just free you from review the post):
NodeA with "inputFloat1" as Input. ""OutputFloat1" as Output
NodeB with "inputFloat2" as Input. ""OutputFloat2" as Output
In NodeB compute it will set NodeA's inputFloat1
1. First I connect NodeA.OutputFloat1 to NodeB.inputFloat2
2. Use MEL Command : getAttr NodeA.OutputFloat1
NodeA's compute Called
3. Use MEL Command : getAttr NodeB.OutputFloat2
NodeB's compute Called
Until now everything works well. However if I add one more translate after NodeB's OutputFloat2, connect it with TranslateX
1. First I connect NodeA.OutputFloat1 to NodeB.inputFloat2
2. Then connect NodeB.outputFloat2 to Transform.tx
NodeA's compute Called
NodeB's compute Called
3. Use MEL Command : setAttr NodeA.InputFloat1
4. Use MEL Command : getAttr NodeA.OutputFloat1
NodeA's compute Called
5. Use MEL Command : getAttr NodeB.OutputFloat2
NodeB's compute Called (when this called, NodeA's input is set and dirty propagate, I sure this one)
NodeA's compute Called (Need to clean relevant plug, but now NodeB's output become dirty, so contine call NodeA ?)
NodeB's compute Called (Inherit operation from above)
The last step is unexpect to me. I think only NodeB's compute will be called once. I am not sure this is what you mean "make relevant plug clean" so the last two compute call to NodeA and NodeB is mean to make Transform.tx
plug clean (and it should response for cleaning plugs connecting from this plug)? Because the last operation i do is only query NodeB's output Attribute and if i not connect transform node after NodeB the last two compute call won't happen. Any thing wrong about my conclusion ?