public void userCB(object sender, MAttr2PlugFunctionArgs arg) { MNodeMessage.AttributeMessage msg = arg.msg; MPlug plug = arg.plug; MPlug otherPlug = arg.otherPlug; if ((msg & MNodeMessage.AttributeMessage.kConnectionMade) != 0) { MGlobal.displayInfo("Connection made "); } else if ((msg & MNodeMessage.AttributeMessage.kConnectionBroken) != 0) { MGlobal.displayInfo("Connection broken "); } else { return; } MGlobal.displayInfo(plug.info); if ((msg & MNodeMessage.AttributeMessage.kOtherPlugSet) != 0) { if ((msg & MNodeMessage.AttributeMessage.kIncomingDirection) != 0) { MGlobal.displayInfo(" <-- " + otherPlug.info); } else { MGlobal.displayInfo(" --> " + otherPlug.info); } } MGlobal.displayInfo("\n"); }
public void userCB(object sender, MAttr2PlugFunctionArgs arg) { MNodeMessage.AttributeMessage msg = arg.msg; MPlug plug = arg.plug; MPlug otherPlug = arg.otherPlug; if ((msg & MNodeMessage.AttributeMessage.kConnectionMade) != 0) { MGlobal.displayInfo("Connection made "); } else if ((msg & MNodeMessage.AttributeMessage.kConnectionBroken) != 0) { MGlobal.displayInfo("Connection broken "); } else { return; } MGlobal.displayInfo(plug.info); if ((msg & MNodeMessage.AttributeMessage.kOtherPlugSet) != 0) { if ((msg & MNodeMessage.AttributeMessage.kIncomingDirection) != 0) { MGlobal.displayInfo(" <-- " + otherPlug.info); } else { MGlobal.displayInfo(" --> " + otherPlug.info); } } MGlobal.displayInfo("\n"); }