Skip to content

Instantly share code, notes, and snippets.

@teionn
Last active May 25, 2020 23:05
Show Gist options
  • Save teionn/88b899313067276f2bf8797569086628 to your computer and use it in GitHub Desktop.
Save teionn/88b899313067276f2bf8797569086628 to your computer and use it in GitHub Desktop.
diff vertex order
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