// Malcolm Kesson
// Nov 16 2012
global proc mocapUI()
{
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;
// mocapUI;
// 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 "mocapRI";
$attr = `rmanGetAttrName "mocap_datapath"`;
rmanAddAttr $shapeName $attr "";
$attr = `rmanGetAttrName "mocap_geo"`;
rmanAddAttr $shapeName $attr "0";
$attr = `rmanGetAttrName "mocap_scale"`;
rmanAddAttr $shapeName $attr "0.03";
$attr = `rmanGetAttrName "mocap_width"`;
rmanAddAttr $shapeName $attr "0.3";
$attr = `rmanGetAttrName "mocap_trail"`;
rmanAddAttr $shapeName $attr "1";
$attr = `rmanGetAttrName "mocap_step"`;
rmanAddAttr $shapeName $attr "1";
$attr = `rmanGetAttrName "mocap_cache"`;
rmanAddAttr $shapeName $attr "0";
}
}