############################################################################# # hecrease.py 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 ############################################################################# import maya.cmds as mc selectedObjects = mc.ls(sl=True) for currentObject in selectedObjects: mc.select(currentObject, r=True) mc.polySelectConstraint(m=3, t=0x8000, sm=1) mc.polyCrease(value=10) mc.polySelectConstraint(sm=0) mc.select(selectedObjects, r=True)