@classmethod
    def select_zero_uv_area_faces(cls):
        """selects faces with zero UV area
        """
        def area(p):
            return 0.5 * abs(sum(x0 * y1 - x1 * y0
                                 for ((x0, y0), (x1, y1)) in segments(p)))

        def segments(p):
            return zip(p, p[1:] + [p[0]])

        all_meshes = pm.ls(
            [node.getShape() for node in pm.ls(sl=1)],
            type='mesh'
        )

        mesh_count = len(all_meshes)

        from anima.ui.progress_dialog import ProgressDialogManager
        pdm = ProgressDialogManager()

        if not pm.general.about(batch=1) and mesh_count:
            pdm.use_ui = True

        caller = pdm.register(mesh_count, 'check_uvs()')

        faces_with_zero_uv_area = []
        for node in all_meshes:
            all_uvs = node.getUVs()
            for i in range(node.numFaces()):
                uvs = []
                try:
                    for j in range(node.numPolygonVertices(i)):
                        #uvs.append(node.getPolygonUV(i, j))
                        uv_id = node.getPolygonUVid(i, j)
                        uvs.append((all_uvs[0][uv_id], all_uvs[1][uv_id]))
                    if area(uvs) == 0.0:
                        #meshes_with_zero_uv_area.append(node)
                        #break
                        faces_with_zero_uv_area.append(
                            '%s.f[%s]' % (node.fullPath(), i)
                        )
                except __HOLE__:
                    faces_with_zero_uv_area.append(
                        '%s.f[%s]' % (node.fullPath(), i)
                    )

            caller.step()

        if len(faces_with_zero_uv_area) == 0:
            pm.warning('No Zero UV area polys found!!!')
        else:
            pm.select(faces_with_zero_uv_area)
dataset/ETHPy150Open eoyilmaz/anima/anima/env/mayaEnv/toolbox.py/Modeling.select_zero_uv_area_faces