Created
November 20, 2018 16:04
-
-
Save rondreas/b75de3e98ddb857810711f316ed12c9d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| def getActive(): | |
| """ Check current selection to find if we're currently only selecting a specific component. """ | |
| if all(isinstance(x, pm.MeshFace) for x in pm.selected()): | |
| return eSelection.face | |
| if all(isinstance(x, pm.MeshEdge) for x in pm.selected()): | |
| return eSelection.edge | |
| if all(isinstance(x, pm.MeshVertex) for x in pm.selected()): | |
| return eSelection.vert | |
| # If no matching component, default to object | |
| return eSelection.object |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment