Hey all, new user here. I’m in the process of picking up MEL/Python for Maya, but am having trouble with hovering over a mesh to select individual edges, after using the polySplit command.
I have created a cylinder primitive with 6 axis divisions (hexagon face) and have tried the following Python commands after selecting two vertices:
from maya import cmds
cmds.polySplit(insertpoint=[(6, 0), (9, 0)])
This creates a new edge. However, when I mouse over the new edge and click to select, I select multiple edges instead of the one:
And the Script Editor history shows the MEL command:
Ideally, I would just like to mouse over to select the one edge with id #18. Not sure if I’ve changed my selection settings somehow, or if I have extra geometry on the mesh, etc.
I’ve tried to reset my select tool to default; have also tried Mesh->Cleanup which seems to have no effect.
Note that the MEL command below works for me, however I want to get the edge with mouse hover and not by script:
I do not get the same behaviour if I replicate your exact setup, but it behaves exactly as you would expect. After the polySplit I hover over the new edge and it pre-selct highlights just that edge, and clicking it selects only that edge. I can only assume you have a selection constraint enabled, or some other extra select option turned on. not sure what that may be though…
However, while you may ultimately want to use polySplit for more advanced cutting, I wouldn’t use it for creating edges between existing vertices. Use polyConnectComponents instead, as this is much simpler and safer to use and allows you to pass direct components in (the indices you need in polySplit are the edge indices, which are far more tedious to retrieve from selected verts):
Looks like a reset on the select tool, and restarting Maya fixed the multiple edge select issue for me.
Just tried out polyConnectComponents - this command is straightforward and makes much more sense for this use case. Thanks for the help, should be all set!