Once more thank you very much to Joojaa for the extensive help.
My output names seam to be a little bit confusing. In the "if (plug == aOutA)" block I do NOT check the dirty state of aOutA, but of aOutB !
I have read once more the MPxNode, the MDataHandle and the MDataBlock chapters and I am really sure, the only thing that can be wrong is line 59, where the documentation says:
bool MDataBlock:: isClean ( const MObject & attribute, MStatus * ReturnStatus )
Description:
Queries the dependency graph to see whether the given attribute is clean.
Arguments:
attribute the attribute that is to be query
Return Value:
result boolean code, true if the attribute is clean, false otherwise.
Status Codes:
MS::kSuccess operation successful.
MS::kInvalidParameter The attribute is invalid.
The documentation line marked red in Joojaas last reply quote that MPlug& plug always holds only ONE attribute. The attribute currently computed. It is called, because it has been requested from within maya and had the dirty bit set.
If the value of the dirty attribute is not requested, it is not passed as plug to the compute function and will nerver be cleaned. Right?!
Here is what I did after loading the plugin in maya:
createNode IsCleanCheck;
// what returns me an instance of my node named
// IsCleanCheck1
setAttr IsCleanCheck1.input 8;
// what makes me shure that outA and outB are set dirty,
// because they are affected by the input
getAttr IsCleanCheck1.outB;
// it returns the input, 8, what shows me that the compute has been called
// correctly with plug == aOutB and outB is clean now.
// Because of my condition test "if (plug == aOutA)" has not been true until now,
// outA is still dirty.
getAttr IsCleanCheck1.outA
// the compute function is called with plug == aOutA.
// "data.isClean( aOutB, &stat);" should pass 1 to outA because outB must
// be always clean because I didn't change the input.
// But it returns 0.
// ( And by the way: if you ask for outA first after changing input
// it returns 0, too. But in this case it is the expected result of course... )
I only see three possibilities:
1. outA has been recomputed before it was called. But in any Maya Documentation you can read that Maya does not so.
2. The IsCleanCheck function does not work correctly (say: there is a bug).
3. "outA = data.isClean( aOutB, &stat);" is not the way the syntax works.