Skip to content

Instantly share code, notes, and snippets.

@SEVEZ
Last active November 28, 2017 17:42
Show Gist options
  • Select an option

  • Save SEVEZ/31bbdb44ee2e8b65e9dc87a198f62200 to your computer and use it in GitHub Desktop.

Select an option

Save SEVEZ/31bbdb44ee2e8b65e9dc87a198f62200 to your computer and use it in GitHub Desktop.
Custom vertex chamfer procedure, fixes the bug with multiple selected vertices #WIP
import maya.cmds as mc
import maya.mel as mel
sel = mc.ls( sl=1 )
if len( sel ) > 1:
mc.polyExtrudeVertex( sel, ch=1, d=1, w=0.25 )
mc.polyDelEdge( mc.polyListComponentConversion( mc.filterExpand( mc.polyListComponentConversion( sel, tf=1 ), ex=1, sm=34 ), te=1, internal=1 ), cv=1, ch=1 )
mc.select( cl=1 )
else:
mel.eval( 'polyChamferVtx 1 0.25 0' )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment