//
// Pre Shape User Interface (UI) Mel Script
//
global proc useArchivesUI()
{
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;
// useArchivesUI;
// 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 "useArchivesRI";
$attr = `rmanGetAttrName "ua_path"`;
rmanAddAttr $shapeName $attr "";
$attr = `rmanGetAttrName "ua_mode"`;
rmanAddAttr $shapeName $attr "0";
$attr = `rmanGetAttrName "ua_offset"`;
rmanAddAttr $shapeName $attr "0";
}
}