API Guide > Shapes > 

Marking Menus


MPxSurfaceShape objects can have an associated marking menu. A MEL function that defines the marking menu for the node must be created with the following name: $nodeName + "DagMenuProc". An example is as follows:

global proc apiMeshDagMenuProc( string $parent, string $child )
    setParent -m $parent;
    // Simple marking menu with 3 items at
    // N north, W west and E east.
    string $cmd = "hide " + $child;
    menuItem -l "Hide" -rp "N" -c $cmd;
    $cmd = "boundingBoxDisplayCtrl(1,\"\");";
    menuItem -l "Show bounding box" -rp "W" -c $cmd;
    $cmd = "boundingBoxDisplayCtrl(0,\"\");";
    menuItem -l "Hide bounding box" -rp "E" -c $cmd;

Executing the MEL script above and then right-clicking on the custom surface shape node will invoke the marking menu.