Created
November 12, 2012 09:21
-
-
Save codedependant/4058325 to your computer and use it in GitHub Desktop.
Maya Python Select Verticies by Material
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymel.core as pm | |
import maya.cmds as cmds | |
cmds.hyperShade(o="lambert1") | |
cmds.ConvertSelectionToVertices() | |
#shrink selected region to avoid border verticies | |
cmds.ShrinkPolygonSelectionRegion() | |
#list selected verticies, sl for selected, fl for ungrouped | |
print pm.ls(sl=True,fl=True,l=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd always wondered what the command was for selecting by material. Thanks for sharing.