Last active
May 25, 2020 23:05
-
-
Save teionn/88b899313067276f2bf8797569086628 to your computer and use it in GitHub Desktop.
diff vertex order
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
src_list=[] | |
src = "pCube1" | |
trg = "pSphere1" | |
for vtx in cmds.ls("{}.vtx[*]".format(src), fl=True): | |
cmds.select(vtx) | |
cmds.polySelectConstraint(pp=1,t=0x0001) | |
src_list.append([int(re.findall("\[(\d+)\]", index)[0]) for index in cmds.ls(sl=True, fl=True)]) | |
trg_list=[] | |
for x in cmds.ls("{}.vtx[*]".format(trg), fl=True): | |
cmds.select(x) | |
cmds.polySelectConstraint(pp=1,t=0x0001) | |
trg_list.append([int(re.findall("\[(\d+)\]", index)[0]) for index in cmds.ls(sl=True, fl=True)]) | |
print src_list == trg_list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment