質問

I am trying to select all vertices on an object that have been merged after executing a polyMergeVertex mel command. The original idea was to keep track of what vertices existed before the merge and then compare them to the vertices after the merge.

This seems to be a tedious solution, as it would be difficult to figure out which vertices are the result of the merge. Is there a more efficient way to highlight merged vertices after running a polyMergeVertex command?

役に立ちましたか?

解決

Check out this code:

from maya import cmds as mc


sel = mc.ls(sl=True)#here you get the selected vertex
mc.polyMergeVertex(sel)#Merge those vertex

mc.select(sel)#if you run this you will see that the selected vertex are diferent from the ones you made the merge.

Lets work arround this, you will have the name of the original vertex in the "sel" variable, but after the merge, Maya will rename the vertex of the mesh so they will match your result vertex from the merge and other vertex next to him.

Im not sure why you need something like this but hope it helps.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top