active_sel = maya.OpenMaya.MSelectionList()
maya.OpenMaya.MGlobal.getActiveSelectionList(active_sel)
dag = maya.OpenMaya.MDagPath()
active_sel.getDagPath(0, dag)
mesh_fn
active_sel = maya.OpenMaya.MSelectionList()
maya.OpenMaya.MGlobal.getActiveSelectionList(active_sel)
dag = maya.OpenMaya.MDagPath()
active_sel.getDagPath(0, dag)
mesh_fn