When I dirty an input plug for example mFileAttr
, the setDependentsDirty()
gets properly invoked, but the value of fileName
plug is still the old value! I only see it getting updated once it goes through compute()
. How can I access the new value in setDependentsDirty()
function since it's indeed triggered by the plug value update?
MStatus FNode::setDependentsDirty(const MPlug& plug, MPlugArray& plugArray) {
if (plug == mFileAttr)
{
MPlug fileNamePlug(thisMObject(), plug);
MString fileName = fileNamePlug.asString();
}
return MPxNode::setDependentsDirty(plug, plugArray); }
Edit:
Just to clarify, reading plug value itself, plug.asString()
, it still holds the old value.