[Closed] Select vertices from skin > edit poly mod
Ok this is driving me crazy… i don’t know what i’m doing wrong so i’m hoping someone can shed some light on this.
I have a simple cylinder with 2 bones in it, skin modifier on the top of the stack. Vertices are rigid weighted to the bones.
I have a script that runs through the object, selects one of the bones, finds which vertices are weighted to it, appends them to a bitarray. It then puts an Edit_Poly mod on top, and is supposed to select the vertices in the bitarray, but it doesn’t select them it just returns true and doesn’t do anything.
this is where it doesn’t work, for the sake of this i jsut set a variable to one of the bitarrays the script generates
tempArray = #{1..37}
modPanel.setCurrentObject $.modifiers[#Edit_Poly]
$.modifiers[#Edit_Poly].SetEPolySelLevel #Vertex
$.modifiers[#Edit_Poly].setSelection #Vertex tempArray
Running this just returns true in the listener, it doesn’t actualy select the vertices, am i doing something wrong when passing the vertices up from the skin
Using
skinOps.selectVerticesByBone theSkin
for i = 1 to vertnum do --vertnum is number of vertices in skin object
(
theVert = skinOps.IsVertexSelected theSkin i
if theVert == 1 do append selectedVerts i
)
Help!! haha thanks!
SkinOps is one of those really annoying implementations. For skinOps to work properly, the node that is being operated on must be selected, and the modify panel must be open. Try that and see if it doesn’t help.
Oh, and here is how to force the modify panel to be open:
max modifiy mode
-Dave
tempArray = #{1..37}
modPanel.setCurrentObject $.modifiers[#Edit_Poly]
$.modifiers[#Edit_Poly].SetEPolySelLevel #Vertex
-- $.modifiers[#Edit_Poly].setSelection #Vertex tempArray
-- change to
$.modifiers[#Edit_Poly].Select #Vertex tempArray
it will work after that…