View Full Version : MergeToCenter without selection

03 March 2011, 02:19 AM
I'm trying to script up something that will merge some edges up together without selecting them. Normally, I'd select the edges and then go to Edit Mesh->Merge To Center and it'll be merged.
Now there are alot (thousands) of edges that I'd like to merge this way without ruining the existing selection, so I'm trying to do a this in a python script. I noticed that if I selected the edges and then did this:

import maya.cmds as cmds

workes about the same way. Now I was wondering and have been trying to figure out if the function takes any arguments and what those arguments are. I tried to find the source file of that function but in python doing this:

import maya.cmds as cmds

doesn't work (probably because that is a function but I'm going to try everything).
Anyway, any ideas on this function or the source for it?

03 March 2011, 03:34 PM
"MergeToCenter" is "run time command". Inner alias called by UI and by hotkey.
real filename containing this mel scripts is "polyMergeToCenter"
if "whatIs" command tell me "run time command", i look in hotkey editor - command there is actual mel script

03 March 2011, 02:53 AM
Thanks for that. I found where it was but it turns out, it doesn't take any arguments.
I had a look around and I saw a polyMergeEdge function but that doesn't take any arguments as well. There is a polySewEdge but that doesn't seem to work if the edges share the same vert and are at right angles to each other.
I was wondering if anyone knew any alternatives?

CGTalk Moderation
03 March 2011, 02:53 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.