Created
September 19, 2023 07:15
-
-
Save TSCG/d85ef06190926055a5144269ccaed287 to your computer and use it in GitHub Desktop.
selShortestEdgePath/ Maya
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
# -*- coding: utf-8 -*- | |
import maya.cmds as cmds | |
import re | |
def selShortestEdgePath(): | |
sel = cmds.ls(sl=1,fl=1) | |
objName = cmds.ls(sl=1,o=1)[0] | |
numA = int( re.findall("(?<=\[).+?(?=\])", sel[0])[0]) | |
numB = int( re.findall("(?<=\[).+?(?=\])", sel[1])[0]) | |
cmds.polySelect( objName,shortestEdgePath=(numA, numB) ) | |
selShortestEdgePath() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment