def clear_mesh():
    ' clear all meshes in the secene\n\n    '
    bpy.ops.object.select_all(action='DESELECT')
    for obj in bpy.data.objects:
        if (obj.type == 'MESH'):
            obj.select = True
    bpy.ops.object.delete()
    for block in bpy.data.meshes:
        if (block.users == 0):
            bpy.data.meshes.remove(block)
    for block in bpy.data.materials:
        if (block.users == 0):
            bpy.data.materials.remove(block)
    for block in bpy.data.textures:
        if (block.users == 0):
            bpy.data.textures.remove(block)
    for block in bpy.data.images:
        if (block.users == 0):
            bpy.data.images.remove(block)
clear all meshes in the secene
def clear_mesh():
    ' \n\n    '
    bpy.ops.object.select_all(action='DESELECT')
    for obj in bpy.data.objects:
        if (obj.type == 'MESH'):
            obj.select = True
    bpy.ops.object.delete()
    for block in bpy.data.meshes:
        if (block.users == 0):
            bpy.data.meshes.remove(block)
    for block in bpy.data.materials:
        if (block.users == 0):
            bpy.data.materials.remove(block)
    for block in bpy.data.textures:
        if (block.users == 0):
            bpy.data.textures.remove(block)
    for block in bpy.data.images:
        if (block.users == 0):
            bpy.data.images.remove(block)