def get_shapes_generator(mobj):
    """
    Returns a generator of all shape nodes for the provided transform node
    :param mobj: MObject, MObject to get teh shape nodes of
    :return: generator
    """
    import maya.OpenMaya as OpenMaya
    if not mobj.apiType() == OpenMaya.MFn.kTransform:
        return
    path = OpenMaya.MDagPath.getAPathTo(mobj)
    num_shapes = OpenMaya.MScriptUtil()
    num_shapes.createFromInt(0)
    num_shapes_ptr = num_shapes.asUintPtr()
    path.numberOfShapesDirectlyBelow(num_shapes_ptr)
    for index in range(OpenMaya.MScriptUtil(num_shapes_ptr).asUint()):
        p = OpenMaya.MDagPath.getAPathTo(mobj)
        p.extendToShapeDirectlyBelow(index)
        yield p.node()
