import pymel.core as pmsel = pm.ls(sl=True)sel[0].getShape().getUVs()
>>> ([], []) # This is empty/no UVs
# Or you could do
sel[0].getShape().map
# or
sel[0].map
# Empty objects should just return something like (depending on object name)
>>> pCubeShape2.map[0]
uvSets = fnMesh.getUVSetNames()
# Note that uvSets can be empty but that is also handled by the any() function.
if not any(fnMesh.getUVs(uvSet)[0] for uvSet in uvSets):
unmapped_meshes.append(fnMesh)