MFnTransform transformFn(transformNode); MPlug translationPlug = transformFn.findPlug("translate", true); translationPlug.child(0).setDouble(1); translationPlug.child(1).setDouble(2); translationPlug.child(2).setDouble(3);
MFnDependencyNode node1Fn(node1); MFnDependencyNode node2Fn(node2); MPlug outputPlug = node1Fn.findPlug("output", true); MPlug inputPlug = node2Fn.findPlug("input", true); MStatus status = outputPlug.connectTo(inputPlug);This code snippet finds the output and input plugs of two nodes using MFnDependencyNode and MPlug and then connects them using the connectTo() method. Package library: Autodesk Maya API