meshlabxml/texture.py
def set_texture(script, textName="TEMP3D.png", textDim=1024):
    """Set texture

    """
    filter_xml = ''.join([
        '  <filter name="Set Texture">\n',
        '    <Param name="textName"',
        'value="%s"' % textName,
        'description="Texture file"',
        'type="RichString"',
        'tooltip="If the file exists it will be associated to the mesh else a dummy one will be created"',
        '/>\n',
        '    <Param name="textDim"',
        'value="%d"' % textDim,
        'description="Texture Dimension (px)"',
        'type="RichInt"',
        'tooltip="If the named texture doesn\'t exists the dummy one will be squared with this size"',
        '/>\n',
        '  </filter>\n'])
    util.write_filter(script, filter_xml)
    return None
def set_texture(script, textName="TEMP3D.png", textDim=1024):
    """Set texture

    """
    filter_xml = ''.join([
        '  <filter name="Set Texture">\n',
        '    <Param name="textName"',
        'value="%s"' % textName,
        'description="Texture file"',
        'type="RichString"',
        'tooltip="If the file exists it will be associated to the mesh else a dummy one will be created"',
        '/>\n',
        '    <Param name="textDim"',
        'value="%d"' % textDim,
        'description="Texture Dimension (px)"',
        'type="RichInt"',
        'tooltip="If the named texture doesn\'t exists the dummy one will be squared with this size"',
        '/>\n',
        '  </filter>\n'])
    util.write_filter(script, filter_xml)
    return None
Set texture