Not at a computer now but... This gets you the selected objects:

import maya.cmds as cmds
selection = cmds.ls(sl=True)

// Fredrik

Den fre 6 maj 2016 22:54 <s...@weacceptyou.com> skrev:

> Hi sorry, im guessing this is a simple one. But just wanted to know the
> simplest way of doing this.
>
> i want to check that the object i have selected is a polygon mesh. I
> assumed i had to use the 'objectType' command. but it seems you have to
> provide the name of the shape node of the object first. If there is a pymel
> way of doing it that is also fine,
>
> any help would be great,
> thanks,
> Sam
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/3a332d6c-0659-4d67-98e1-9b2caabeb760%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAD%3DwhWN6joiLnHGE67PoTwPRyPEkty2opeKcVcNMMKv0Pqni_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to