meshlabxml/mlx.py
def default_output_mask(file_out, texture=True, vert_normals=True, vert_colors=False,
                        face_colors=False, ml_version=ML_VERSION):
    """
    Set default output mask options based on file extension
    Note: v1.34BETA changed -om switch to -m
    Possible options (not all options are available for every format):
     vc -> vertex colors
     vf -> vertex flags
     vq -> vertex quality
     vn -> vertex normals
     vt -> vertex texture coords
     fc -> face colors
     ff -> face flags
     fq -> face quality
     fn -> face normals
     wc -> wedge colors
     wn -> wedge normals
     wt -> wedge texture coords
    """
    vn = ''
    wt = ''
    vc = ''
    fc = ''

    if ml_version < '1.3.4':
        om = '-om'
    else:
        om = '-m'

    fext = os.path.splitext(file_out)[1][1:].strip().lower()
    if fext in ['stl', 'dxf', 'xyz']:
        om = ''
        texture = False
        vert_normals = False
        vert_colors = False
        face_colors = False
#    elif fext == 'ply':
#        vert_colors = True

    if vert_normals:
        vn = ' vn'
    if texture:
        wt = ' wt'
    if vert_colors:
        vc = ' vc'
    if face_colors:
        fc = ' fc'
    output_mask = '{}{}{}{}{}'.format(om, vn, wt, vc, fc)
    return output_mask
def default_output_mask(file_out, texture=True, vert_normals=True, vert_colors=False,
                        face_colors=False, ml_version=ML_VERSION):
    """
    Set default output mask options based on file extension
    Note: v1.34BETA changed -om switch to -m
    Possible options (not all options are available for every format):
     vc -> vertex colors
     vf -> vertex flags
     vq -> vertex quality
     vn -> vertex normals
     vt -> vertex texture coords
     fc -> face colors
     ff -> face flags
     fq -> face quality
     fn -> face normals
     wc -> wedge colors
     wn -> wedge normals
     wt -> wedge texture coords
    """
    vn = ''
    wt = ''
    vc = ''
    fc = ''

    if ml_version < '1.3.4':
        om = '-om'
    else:
        om = '-m'

    fext = os.path.splitext(file_out)[1][1:].strip().lower()
    if fext in ['stl', 'dxf', 'xyz']:
        om = ''
        texture = False
        vert_normals = False
        vert_colors = False
        face_colors = False
#    elif fext == 'ply':
#        vert_colors = True

    if vert_normals:
        vn = ' vn'
    if texture:
        wt = ' wt'
    if vert_colors:
        vc = ' vc'
    if face_colors:
        fc = ' fc'
    output_mask = '{}{}{}{}{}'.format(om, vn, wt, vc, fc)
    return output_mask
Set default output mask options based on file extension
    Note: v1.34BETA changed -om switch to -m
    Possible options (not all options are available for every format):
     vc -> vertex colors
     vf -> vertex flags
     vq -> vertex quality
     vn -> vertex normals
     vt -> vertex texture coords
     fc -> face colors
     ff -> face flags
     fq -> face quality
     fn -> face normals
     wc -> wedge colors
     wn -> wedge normals
     wt -> wedge texture coords