def getObjectAsPointCloud(obj):
    try:
        obj = obj.model.polyDataObj
    except __HOLE__:
        pass

    try:
        obj.polyData
    except AttributeError:
        return None

    if obj and obj.polyData.GetNumberOfPoints():# and (obj.polyData.GetNumberOfCells() == obj.polyData.GetNumberOfVerts()):
        return obj
dataset/ETHPy150Open RobotLocomotion/director/src/python/director/robotviewbehaviors.py/getObjectAsPointCloud