Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 2014.06.04 For hardcore XSI fans
- # Original .mel idea by 'jimtheartist'
- # Converted to python and edited by Bravlin Pechatnik
- # This script converts selected components with adjacent multiplication
- # First function call convert selected component, second call apply adjacent multiplication
- # Bind this pythone keys:
- # AdjacentConversion.ConvertToAdjacentVerts()
- # AdjacentConversion.ConvertToAdjacentEdges()
- # AdjacentConversion.ConvertToAdjacentFaces()
- import maya.cmds as mc
- def ConvertToAdjacentVerts():
- sel = mc.ls(sl = True, fl = True)
- mc.ConvertSelectionToEdges()
- mc.ConvertSelectionToVertices()
- mc.select(sel, d = True)
- def ConvertToAdjacentEdges():
- sel = mc.ls(sl = True, fl = True)
- selType= mc.filterExpand(sm=34)
- if selType != None:
- mc.ConvertSelectionToEdges()
- else:
- mc.ConvertSelectionToVertices()
- mc.ConvertSelectionToEdges()
- mc.select(sel, d = True)
- def ConvertToAdjacentFaces():
- sel = mc.ls(sl = True, fl = True)
- mc.ConvertSelectionToEdges()
- mc.ConvertSelectionToFaces()
- mc.select(sel, d = True)
Advertisement
Add Comment
Please, Sign In to add comment