With PyMel you have this solution: maya_node = pmc.selected()[0] or maya_node = pmc.PyNode("YourNode")
# Check if given node is pymel node if isinstance(maya_node , pmc.PyNode): # Do somthing or # Check if given node is pymel mesh node if isinstance(maya_node , pmc.nodetype.Mesh): # Do somthing # Check if given node is Mesh or NurbsSurface or ... if isinstance(maya_node , (pmc.nodetype.Mesh, pmc.nodetype.NurbsSurface , ...)): # Do somthing Le vendredi 6 mai 2016 22:54:53 UTC+2, s...@weacceptyou.com a écrit : > > 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/89de7d8c-e0c3-4337-bba0-82cffc2f358d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.