global proc particleCurvesUI() 
{
string $selected[] = `ls -sl`;
int $i;
  
for($i = 0; $i < size($selected); $i++ ) {
    string $shp[] = `listRelatives -shapes $selected[$i]`;
  
    // To add the UI implemented by this proc to the "Geometric
    // Settings" panel use the following mel commands,
    //        select rmanSettings;
    //        particleCurvesUI;
    // where "rmanSettings" might be rmanSettings1, rmanSettings2 etc.
    if(`nodeType $selected[$i]` == "RenderMan")
        $shp[0] = $selected[$i];
  
    string $shapeName = $shp[0];
    string $attr = `rmanGetAttrName "preShapeScript"`;
  
    // "Connect" to the mel script that calls 
    // Pixar's custom Ri mel procedures.
    rmanAddAttr $shapeName $attr "particleCurvesRI";
        
    $attr = `rmanGetAttrName "pc_width"`;
    rmanAddAttr $shapeName $attr "0.02";
  
    $attr = `rmanGetAttrName "pc_round"`;
    rmanAddAttr $shapeName $attr "1";
  
    $attr = `rmanGetAttrName "pc_attrname"`;
    rmanAddAttr $shapeName $attr "probability";
    }
}