meshlabxml/texture.py
def flat_plane(script, plane=0, aspect_ratio=False):
    """Flat plane parameterization

    """
    filter_xml = ''.join([
        '  <filter name="Parametrization: Flat Plane ">\n',
        '    <Param name="projectionPlane"',
        'value="%d"' % plane,
        'description="Projection plane"',
        'enum_val0="XY"',
        'enum_val1="XZ"',
        'enum_val2="YZ"',
        'enum_cardinality="3"',
        'type="RichEnum"',
        'tooltip="Choose the projection plane"',
        '/>\n',
        '    <Param name="aspectRatio"',
        'value="%s"' % str(aspect_ratio).lower(),
        'description="Preserve Ratio"',
        'type="RichBool"',
        'tooltip="If checked the resulting parametrization will preserve the original apsect ratio of the model otherwise it will fill up the whole 0..1 uv space"',
        '/>\n',
        '  </filter>\n'])
    util.write_filter(script, filter_xml)
    return None
def flat_plane(script, plane=0, aspect_ratio=False):
    """Flat plane parameterization

    """
    filter_xml = ''.join([
        '  <filter name="Parametrization: Flat Plane ">\n',
        '    <Param name="projectionPlane"',
        'value="%d"' % plane,
        'description="Projection plane"',
        'enum_val0="XY"',
        'enum_val1="XZ"',
        'enum_val2="YZ"',
        'enum_cardinality="3"',
        'type="RichEnum"',
        'tooltip="Choose the projection plane"',
        '/>\n',
        '    <Param name="aspectRatio"',
        'value="%s"' % str(aspect_ratio).lower(),
        'description="Preserve Ratio"',
        'type="RichBool"',
        'tooltip="If checked the resulting parametrization will preserve the original apsect ratio of the model otherwise it will fill up the whole 0..1 uv space"',
        '/>\n',
        '  </filter>\n'])
    util.write_filter(script, filter_xml)
    return None
Flat plane parameterization