def _is_visible(node):
     """Return whether node is visible"""
     return lib.is_visible(node,
                           displayLayer=False,
                           intermediateObject=True,
                           parentHidden=True,
                           visibility=True)
    def check_geometry_hidden(self, export_members):

        # Ensure all instanced geometry is hidden
        shapes = cmds.ls(export_members,
                         dag=True,
                         shapes=True,
                         noIntermediate=True)
        meshes = cmds.ls(shapes, type="mesh")

        visible = [
            node for node in meshes if lib.is_visible(
                node, displayLayer=False, intermediateObject=False)
        ]
        if visible:
            return False

        return True
 def get_invalid(instance):
     joints = cmds.ls(instance, type='joint', long=True)
     return [j for j in joints if lib.is_visible(j, displayLayer=True)]