///////////////////////////////////////////////////////////////////////////// // hecrease.mel version 1.0 by Andrew Osiow Copyright 2008 // // Hard Edge (he) crease is a small script for Creasing Hard Edges on a Polymesh. // // All Hard Edges on all selected objects will be assigned a full (10) crease. // It's pretty easy to modify the script for a less intense crease. // // Designed to be used with RenderMan for Maya with a polymesh has been tagged // with a subdiv scheme. These Polymeshes are converted to subdivs at render time. // Polymeshes are tagged by adding a Subdiv Scheme Attribute with Attibute Editor. // From the Attribute Editor, Select Add Attribute->RenderMan->Subdiv Scheme. // // Any poly creased edge will be rendered as a Subdiv Creased Edge. // It seems that border edges are automatically rendered as creased edges. // // To be used freely with the author's permission. Please contact the author // if you wish upload or post this script. // // andrew@andrews3dbrain.com ///////////////////////////////////////////////////////////////////////////// global proc hecrease () { // creases all hard edges of all selected objects string $selectedObjects[] = `ls -sl`; for ($currentObject in $selectedObjects) { select -r $currentObject; polySelectConstraint -m 3 -t 0x8000 -sm 1; polyCrease -value 10.0; polySelectConstraint -sm 0; } select -r $selectedObjects; }