PDA

View Full Version : API: how to check the dirtyBit status of a plug?


tredeger
10-03-2006, 08:20 PM
Hi,

I know how to use a data handle to a plug to set it clean after you've re-evaluated and set it's value in the compute function. BUT what I'd like to know is this:

Is there a way to query the plug from within the compute function to determine it's dirtyBit status? Thanks in advance for any help.

cheers,
j

tredeger
10-03-2006, 08:56 PM
OK, I was looking in the MDataHandle and MDataArrayHandle classes for a way of determining if an attr was clean or dirty in the DG.

I have done some more RTFMing and found in the MDataBlock itself the 'isClean' method. Here's the thing: the docs let you use this method to query the DG to see whether the given attr is clean but you can also use it slightly differently to determine if a given PLUG is clean. Now, can anyone explain the difference in usage to me? How does an attr's plug differ from the attr itself in this case? And is it possible that an attr can be dirty while it's plug is clean or vice versa? Thanks in advance for any illumination.

cheers,
jazz

tredeger
10-03-2006, 08:57 PM
Oh, and while I've found this 'isClean' method of MDataBlock, I'm not quite sure how one would go about using it. Would anyone out there be able to post a same line of code? Rock on.

CGTalk Moderation
10-03-2006, 08:57 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.