// Generated by Cutter v6.0.0 at 11:57:11 on the 4.13.2010. // The source document on which this mel script is based is, // "/home/mgonul20/maya/projects/RMS_mel/addSpheresToMeshUI.rman" // Cutter software by Malcolm Kesson (all rights reserved). // Executing this script will cause a RenderMan Studio // Pre-Shape Mel Script to be added to the current // selection of objects in the Maya scene. // global proc addSpheresToMeshUI() { string $selected[] = `ls -sl`; int $i, $j; for( $i=0; $i < size($selected); $i++ ) { string $shp[] = `listRelatives -shapes $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 "addSpheresToMeshRI"; $attr = `rmanGetAttrName "rad"`; rmanAddAttr $shapeName $attr "0.001"; $attr = `rmanGetAttrName "jitter"`; rmanAddAttr $shapeName $attr "0"; $attr = `rmanGetAttrName "colorize"`; rmanAddAttr $shapeName $attr "0"; $attr = `rmanGetAttrName "seed"`; rmanAddAttr $shapeName $attr "0"; $attr = `rmanGetAttrName "useArchive"`; rmanAddAttr $shapeName $attr "0"; $attr = `rmanGetAttrName "fileArchive"`; rmanAddAttr $shapeName $attr "/path/to/xxxx.rib"; $attr = `rmanGetAttrName "archiveScale"`; rmanAddAttr $shapeName $attr "0"; $attr = `rmanGetAttrName "archiveTumble"`; rmanAddAttr $shapeName $attr "0"; } }