I'm writing custom maya export plugin and I need to read expression of Node's attribute. But when I tried to use Maya api "MFnExpression" to read expression I get always
(kInvalidParameter): Object is incompatible with this method
Below is code:
MFnExpression fnExpression(dagPath.node(), &status);
cout << endl << dagPath.fullPathName() << " status " << status << endl;
Any reference code could be helpful.