def parameters_ui(layout, params):
    """ Create the ui for the rig parameters."""
    r = layout.row()
    r.prop(params, 'limb_type')
    r = layout.row()
    r.prop(params, 'rotation_axis')
    if 'auto' not in params.rotation_axis.lower():
        r = layout.row()
        etremities = {'arm': 'Hand', 'leg': 'Foot', 'paw': 'Claw'}
        text = 'Auto align ' + etremities[params.limb_type]
        r.prop(params, 'auto_align_extremity', text=text)
    r = layout.row()
    r.prop(params, 'segments')
    r = layout.row()
    r.prop(params, 'bbones')
    for layer in ['fk', 'tweak']:
        r = layout.row()
        r.prop(params, layer + '_extra_layers')
        r.active = params.tweak_extra_layers
        col = r.column(align=True)
        row = col.row(align=True)
        for i in range(8):
            row.prop(params, layer + '_layers', index=i, toggle=True, text='')
        row = col.row(align=True)
        for i in range(16, 24):
            row.prop(params, layer + '_layers', index=i, toggle=True, text='')
        col = r.column(align=True)
        row = col.row(align=True)
        for i in range(8, 16):
            row.prop(params, layer + '_layers', index=i, toggle=True, text='')
        row = col.row(align=True)
        for i in range(24, 32):
            row.prop(params, layer + '_layers', index=i, toggle=True, text='')
