Home Technical Talk

Maya Select all by Componets (verts,edges,faces)

polycounter lvl 15
Offline / Send Message
Autocon polycounter lvl 15
So I asked a few guys at work and checked online but couldnt seem to find anything where Maya would allow you to select all components on a selected object like Max where you can just hit Ctrl-A (might be my own personal hotkey) and it would select all Verts, Edges or Faces depending on what mode your in. Or alteast not simpley with 1 button click.

Cant imagine there not being a quick way to do this. If anyone knows how to do it I would really appreciate it. Or if you only know if its possible to do 1 like select all verts that would be cool too.

Or if there was nothing more then merge all verts with a low threshold to cleanup any overlapping verts that would work too.

Replies

  • Adam L. Gray
    Options
    Offline / Send Message
    I think, if you double-click the model, it'll select the whole element. Is that the kind of thing you're after?

    as for cleaning up overlapping verts faces etc.. I haven't really found a good way for it, don't use maya that often though. I once modeled a highpoly plane, and seems like I accidentally cloned the whole mesh multiple times, while still keeping it the same object, without noticing.

    Then I went ahead, modeling, and finally decided to select all vertices and weld them, to make sure there were no small gaps etc. And the whole model ended up being covered in overlapping faces, who were all connected to the same vertices somehow. I tell ya, cleaning up that one was pure hell, even in max, trying to weld it, it just went berserk. Eventually some sort of plugin for max sorted it out for me though :poly122:
  • throttlekitty
    Options
    Offline / Send Message
    If you check the options for Merge Vertices, there's an option to change the distance threshold. After that, a select all verts and merge is enough to clean up any extra edges and faces you may be encountering.
  • Autocon
    Options
    Offline / Send Message
    Autocon polycounter lvl 15
    was looking more for a hotkey that could select all verts with on click instead of having to marque select the entire object to select all the verts. I know there are ways to get to selecting all verts by use of the right click menu thing but that seems to take more clicks and shit then box selecting everything.

    double clicking didnt work ><
  • Adam L. Gray
    Options
    Offline / Send Message
    Hmm, really? I'm pretty sure it did for me :s

    If the function already exists in a menu, then there should be a way to bind a hotkey to it. I'm not on my own computer here tho, but I'll have a look into it in the morning :)

    Cheers
  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    You could just do a small script for it, this works on single objects:
    import maya.cmds as cmds
    list = cmds.ls(sl=True)
    for item in list:
        vtxCount = cmds.polyEvaluate(v=True)
        cmds.select(cl=True)
        cmds.select(item+'.vtx[0:'+str(vtxCount)+']', add=True)
    

    just throw that onto some hotkey and it will select all the verts of a particular object, and can be adjusted to also select faces and edges too (not sure why you would need that but it can do it)
  • haikai
    Options
    Offline / Send Message
    haikai polycounter lvl 8
    You can run the Merge operation with the mesh selected (object mode) which will automatically execute for all the vertices. If you make a script for the Merge operation with the tolerance settings you want and assign your own hotkey then this should result in something as fast as what you're looking for, I think.

    Maya is pretty good at handling things appropriately to the context of what you have selected at the moment. There are a few other tools that can also work on an object level like this such as softening/hardening edge normals.

    I think what Tiros was getting at is that you can double click any face on your object and it will select all the faces in the shell/element. You can then convert this selection to vertices. If it doesn't work then you might be using an old version of Maya (I think that particular feature was implemented in Maya 2008 extension 2).
  • Autocon
    Options
    Offline / Send Message
    Autocon polycounter lvl 15
    m4dcow, I get a syntax error at
    cmds.select(cl=True)



    thanks for the info about the double clicking on the faces to select everything, thought Trios just ment double clicking the object :) and the merge on the entire object worked like a charm to merge the all the verts with the set threshold, thanks a ton :)
  • Illusions
    Options
    Offline / Send Message
    Illusions polycounter lvl 18
    Faster Method: The convert selection hotkeys, CTRL + F9 - F12. Just click the object, then use the appropriate convert selection hotkey. For example, if you want all vertices, select the object, then CTRL + F9.

    Vertices: CTRL + F9
    Edges: CTRL + F10
    Faces: CTRL + F11
    UV's: CTRL + F12

    Make sure that you're in object mode though.
  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    @Autocon I just realized that you can't use python scripts directly in hotkeys. Illusions seems to have what you were looking for :)
  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 18
    Here's a workaround, maybe not usable for what you want.

    But you probably know that F8 goes to object mode, F9 to vertex mode, F10 to edge mode and F11 to face mode. Combine this with the CTRL button and you get a convert action. So you can convert a face selection to a vertex selection for instance. You can also go from having an object selected in object mode and converting to for instance edge mode. This will select all edges. So to clarify, select a whole object, press CTRL+F10, all edges should be selected for that object.

    The bad part then. This doesn't kick you into the respective component mode, you will still be in object mode after converting to this selection. You will however be able to use a command which is for that that specific component mode.
  • Funky Bunnies
    Options
    Offline / Send Message
    Funky Bunnies polycounter lvl 17
    @m4dcow: you should be able to use [*] to select all of a certain component rather than explicitly listing the indices.

    the unfortunate thing is that maya doesn't have component 'modes', just masks. So there's no entirely dependable way that I know of to check what components are selectable. But I use this:
    {
    string $object[] = `ls -hl`;
    
    //check to see if your vertmask mode is on OR if you have any verts selected
        if(`selectType -q -pv` || `filterExpand -sm 31`)
        {
            for ($i=0;$i<`size $object`;$i++)
            {
                //you could use this to check if the object is polygonal or something if you wanted
                //string $shape[] = `listRelatives -s $object[$i]`;
                //if (`nodeType $shape[0]` == "mesh")
                    select -r ($object[$i]+".vtx[*]");
            }
            
        }
    //otherwise check to see if poly edge mask is on or any edges are selected
        else if(`selectType -q -pe` || `filterExpand -sm 32`)
        {
            for ($i=0;$i<`size $object`;$i++)
                select -r ($object[$i]+".e[*]");
        }
    //then check faces...
        else if(`selectType -q -pf` || `filterExpand -sm 34`)
        {
            for ($i=0;$i<`size $object`;$i++)
                select -r ($object[$i]+".f[*]");
        }
    //uvs...
        else if(`selectType -q -puv` || `filterExpand -sm 35`)
        {
            for ($i=0;$i<`size $object`;$i++)
                select -r ($object[$i]+".map[*]");
        }
    //then if there are no objects selected, select everything in the scene
        if (!`size $object`)
            select -all;
    
    }
    

    it's context sensitive but I really only use it for polygonal stuff so I didn't bother putting it the other things. It shouldn't be too much of a bother to add whatever you need yourself.
  • Autocon
    Options
    Offline / Send Message
    Autocon polycounter lvl 15
    thanks for the info everyone, and Funky, the script works great :)
  • Grimm_Wrecking
    Options
    Offline / Send Message
    Grimm_Wrecking polycounter lvl 8
    Could just select the object, RMB(hold)-> face, Dbl click face to select entire (continuous mesh), Ctrl+RMB -> Convert selection to Verts/Edges.

    (2008.5 + I believe)

    "If you check the options for Merge Vertices, there's an option to change the distance threshold. After that, a select all verts and merge is enough to clean up any extra edges and faces you may be encountering."

    That doesn't always work btw. at least not with overlapping faces that occupy the same space. if you smooth you can see they're still there (depends on the situation though)
  • < ASH >
    Options
    Offline / Send Message
    < ASH > polycounter lvl 13
    I bumped into this old thread and I thought that maybe somebody is still wondering about the "Select All" hotkey in Maya ...

    The Select All has been added in Maya 2014:

    - if you RMB in the empty viewport it will display a marking menu where you can see 2 options: "Complete Tool" and "Select All".

    - the MEL for "Select All" function is the following:
    select -cl; MTselAll

    - the hotkey for "Select All" is CRTL + SHIFT + A.
    Hint: if you don't like the default hotkey go in the Hotkey Editor and assign the usual CRTL + A to "Select All" (that is assigned by default to the "Attribute Editor") and assign to the "Attribute Editor" CRTL + SHIFT + A (basically you swap the 2 hotkeys).


    I hope this helps. :)

    Ash
  • asag
    Options
    Offline / Send Message
    asag polycounter lvl 2
    thanks
    default "CRTL + SHIFT + A" works great)
Sign In or Register to comment.