def rename(script, label='<STR_LIT:blank>', layer_num=None):
filter_xml = '<STR_LIT>'.join([<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'.format(label),<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT>'])<EOL>if isinstance(script, mlx.FilterScript):<EOL><INDENT>if (layer_num is None) or (layer_num == script.current_layer()):<EOL><INDENT>util.write_filter(script, filter_xml)<EOL>script.layer_stack[script.current_layer()] = label<EOL><DEDENT>else:<EOL><INDENT>cur_layer = script.current_layer()<EOL>change(script, layer_num)<EOL>util.write_filter(script, filter_xml)<EOL>change(script, cur_layer)<EOL>script.layer_stack[layer_num] = label<EOL><DEDENT><DEDENT>else:<EOL><INDENT>util.write_filter(script, filter_xml)<EOL><DEDENT>return None<EOL>
Rename layer label

    Can be useful for outputting mlp files, as the output file names use
    the labels.

    Args:
        script: the mlx.FilterScript object or script filename to write
            the filter to.
        label (str): new label for the mesh layer
        layer_num (int): layer number to rename. Default is the
            current layer. Not supported on the file base API.

    Layer stack:
        Renames a layer

    MeshLab versions:
        2016.12
        1.3.4BETA