def parameters_ui(layout, params):
    """ Create the ui for the rig parameters.
    """
    r = layout.row()
    r.prop(params, 'separate_extra_layers')
    r = layout.row()
    r.active = params.separate_extra_layers
    col = r.column(align=True)
    row = col.row(align=True)
    row.prop(params, 'extra_layers', index=0, toggle=True, text='')
    row.prop(params, 'extra_layers', index=1, toggle=True, text='')
    row.prop(params, 'extra_layers', index=2, toggle=True, text='')
    row.prop(params, 'extra_layers', index=3, toggle=True, text='')
    row.prop(params, 'extra_layers', index=4, toggle=True, text='')
    row.prop(params, 'extra_layers', index=5, toggle=True, text='')
    row.prop(params, 'extra_layers', index=6, toggle=True, text='')
    row.prop(params, 'extra_layers', index=7, toggle=True, text='')
    row = col.row(align=True)
    row.prop(params, 'extra_layers', index=16, toggle=True, text='')
    row.prop(params, 'extra_layers', index=17, toggle=True, text='')
    row.prop(params, 'extra_layers', index=18, toggle=True, text='')
    row.prop(params, 'extra_layers', index=19, toggle=True, text='')
    row.prop(params, 'extra_layers', index=20, toggle=True, text='')
    row.prop(params, 'extra_layers', index=21, toggle=True, text='')
    row.prop(params, 'extra_layers', index=22, toggle=True, text='')
    row.prop(params, 'extra_layers', index=23, toggle=True, text='')
    col = r.column(align=True)
    row = col.row(align=True)
    row.prop(params, 'extra_layers', index=8, toggle=True, text='')
    row.prop(params, 'extra_layers', index=9, toggle=True, text='')
    row.prop(params, 'extra_layers', index=10, toggle=True, text='')
    row.prop(params, 'extra_layers', index=11, toggle=True, text='')
    row.prop(params, 'extra_layers', index=12, toggle=True, text='')
    row.prop(params, 'extra_layers', index=13, toggle=True, text='')
    row.prop(params, 'extra_layers', index=14, toggle=True, text='')
    row.prop(params, 'extra_layers', index=15, toggle=True, text='')
    row = col.row(align=True)
    row.prop(params, 'extra_layers', index=24, toggle=True, text='')
    row.prop(params, 'extra_layers', index=25, toggle=True, text='')
    row.prop(params, 'extra_layers', index=26, toggle=True, text='')
    row.prop(params, 'extra_layers', index=27, toggle=True, text='')
    row.prop(params, 'extra_layers', index=28, toggle=True, text='')
    row.prop(params, 'extra_layers', index=29, toggle=True, text='')
    row.prop(params, 'extra_layers', index=30, toggle=True, text='')
    row.prop(params, 'extra_layers', index=31, toggle=True, text='')
    r = layout.row()
    r.label(text='Bend rotation axis:')
    r.prop(params, 'primary_rotation_axis', text='')
    col = layout.column()
    col.prop(params, 'use_digit_twist')
