meshlabxml/texture.py
def param_from_rasters(script, useDistanceWeight=True, useImgBorderWeight=True,
                       useAlphaWeight=False, cleanIsolatedTriangles=True,
                       stretchingAllowed=False, textureGutter=4):
    """Set texture

    """
    filter_xml = ''.join([
        '  <filter name="Parameterization from registered rasters">\n',
        '    <Param name="useDistanceWeight"',
        'value="%s"' % str(useDistanceWeight).lower(),
        'description="Use distance weight"',
        'type="RichBool"',
        'tooltip="Includes a weight accounting for the distance to the camera during the computation of reference images"',
        '/>\n',
        '    <Param name="useImgBorderWeight"',
        'value="%s"' % str(useImgBorderWeight).lower(),
        'description="Use image border weight"',
        'type="RichBool"',
        'tooltip="Includes a weight accounting for the distance to the image border during the computation of reference images"',
        '/>\n',
        '    <Param name="useAlphaWeight"',
        'value="%s"' % str(useAlphaWeight).lower(),
        'description="Use image alpha weight"',
        'type="RichBool"',
        'tooltip="If true, alpha channel of the image is used as additional weight. In this way it is possible to mask-out parts of the images that should not be projected on the mesh. Please note this is not a transparency effect, but just influences the weighting between different images"',
        '/>\n',
        '    <Param name="cleanIsolatedTriangles"',
        'value="%s"' % str(cleanIsolatedTriangles).lower(),
        'description="Clean isolated triangles"',
        'type="RichBool"',
        'tooltip="Remove all patches compound of a single triangle by aggregating them to adjacent patches"',
        '/>\n',
        '    <Param name="stretchingAllowed"',
        'value="%s"' % str(stretchingAllowed).lower(),
        'description="UV stretching"',
        'type="RichBool"',
        'tooltip="If true, texture coordinates are stretched so as to cover the full interval [0,1] for both directions"',
        '/>\n',
        '    <Param name="textureGutter"',
        'value="%d"' % textureGutter,
        'description="Texture gutter"',
        'type="RichInt"',
        'tooltip="Extra boundary to add to each patch before packing in texture space (in pixels)"',
        '/>\n',
        '  </filter>\n'])
    util.write_filter(script, filter_xml)
    return None
def param_from_rasters(script, useDistanceWeight=True, useImgBorderWeight=True,
                       useAlphaWeight=False, cleanIsolatedTriangles=True,
                       stretchingAllowed=False, textureGutter=4):
    """Set texture

    """
    filter_xml = ''.join([
        '  <filter name="Parameterization from registered rasters">\n',
        '    <Param name="useDistanceWeight"',
        'value="%s"' % str(useDistanceWeight).lower(),
        'description="Use distance weight"',
        'type="RichBool"',
        'tooltip="Includes a weight accounting for the distance to the camera during the computation of reference images"',
        '/>\n',
        '    <Param name="useImgBorderWeight"',
        'value="%s"' % str(useImgBorderWeight).lower(),
        'description="Use image border weight"',
        'type="RichBool"',
        'tooltip="Includes a weight accounting for the distance to the image border during the computation of reference images"',
        '/>\n',
        '    <Param name="useAlphaWeight"',
        'value="%s"' % str(useAlphaWeight).lower(),
        'description="Use image alpha weight"',
        'type="RichBool"',
        'tooltip="If true, alpha channel of the image is used as additional weight. In this way it is possible to mask-out parts of the images that should not be projected on the mesh. Please note this is not a transparency effect, but just influences the weighting between different images"',
        '/>\n',
        '    <Param name="cleanIsolatedTriangles"',
        'value="%s"' % str(cleanIsolatedTriangles).lower(),
        'description="Clean isolated triangles"',
        'type="RichBool"',
        'tooltip="Remove all patches compound of a single triangle by aggregating them to adjacent patches"',
        '/>\n',
        '    <Param name="stretchingAllowed"',
        'value="%s"' % str(stretchingAllowed).lower(),
        'description="UV stretching"',
        'type="RichBool"',
        'tooltip="If true, texture coordinates are stretched so as to cover the full interval [0,1] for both directions"',
        '/>\n',
        '    <Param name="textureGutter"',
        'value="%d"' % textureGutter,
        'description="Texture gutter"',
        'type="RichInt"',
        'tooltip="Extra boundary to add to each patch before packing in texture space (in pixels)"',
        '/>\n',
        '  </filter>\n'])
    util.write_filter(script, filter_xml)
    return None
def param_from_rasters ( script , useDistanceWeight = True , useImgBorderWeight = True , useAlphaWeight = False , cleanIsolatedTriangles = True , stretchingAllowed = False , textureGutter = 4 ) : filter_xml = '' . join ( [ '  <filter name="Parameterization from registered rasters">\n' , '    <Param name="useDistanceWeight"' , 'value="%s"' % str ( useDistanceWeight ) . lower ( ) , 'description="Use distance weight"' , 'type="RichBool"' , 'tooltip="Includes a weight accounting for the distance to the camera during the computation of reference images"' , '/>\n' , '    <Param name="useImgBorderWeight"' , 'value="%s"' % str ( useImgBorderWeight ) . lower ( ) , 'description="Use image border weight"' , 'type="RichBool"' , 'tooltip="Includes a weight accounting for the distance to the image border during the computation of reference images"' , '/>\n' , '    <Param name="useAlphaWeight"' , 'value="%s"' % str ( useAlphaWeight ) . lower ( ) , 'description="Use image alpha weight"' , 'type="RichBool"' , 'tooltip="If true, alpha channel of the image is used as additional weight. In this way it is possible to mask-out parts of the images that should not be projected on the mesh. Please note this is not a transparency effect, but just influences the weighting between different images"' , '/>\n' , '    <Param name="cleanIsolatedTriangles"' , 'value="%s"' % str ( cleanIsolatedTriangles ) . lower ( ) , 'description="Clean isolated triangles"' , 'type="RichBool"' , 'tooltip="Remove all patches compound of a single triangle by aggregating them to adjacent patches"' , '/>\n' , '    <Param name="stretchingAllowed"' , 'value="%s"' % str ( stretchingAllowed ) . lower ( ) , 'description="UV stretching"' , 'type="RichBool"' , 'tooltip="If true, texture coordinates are stretched so as to cover the full interval [0,1] for both directions"' , '/>\n' , '    <Param name="textureGutter"' , 'value="%d"' % textureGutter , 'description="Texture gutter"' , 'type="RichInt"' , 'tooltip="Extra boundary to add to each patch before packing in texture space (in pixels)"' , '/>\n' , '  </filter>\n' ] ) util . write_filter ( script , filter_xml ) return None
Set texture
Set texture