Skip to content

Fix broken Rigify rig layer

Reason

After the update to Blender 4.0 version, new bone collections replace both legacy numbered layers and bone groups, please refer to the update log for details.

Rigify generates Rig Layers for control through Python scripts, and you can fix them according to this guide.

You can also watch this video to learn more.

Step

Found the script

You can switch the view to Scripting and then locate rig_ui.py. By default, it displays the end part of the script; with just a slight scroll, you'll be able to see the section that needs modification.

Replace text

You can click on the top right corner of the fixed version to copy, then click on the original version column, which is where modifications are needed.

Find the corresponding section in Blender, select all and then paste to overwrite.

Check the naming of the Armature, replace rig with the corresponding name, and then run the script.

python
    def draw(self, context):
        layout = self.layout
        col = layout.column()

		collection =  bpy.data.armatures["rig"].collections

		row = col.row()
		row.prop(collection["Layer 2"], 'is_visible', toggle=True, text='Face ')
		row.prop(collection["Layer 3"], 'is_visible', toggle=True, text='Face (detail) ')
		
		row = col.row()
		row.separator()
		
		row = col.row()
		row.prop(collection["Layer 4"], 'is_visible', toggle=True, text='Torso')

		row = col.row()
		row.prop(collection["Layer 5"], 'is_visible', toggle=True, text='Torso (Tweak)')

		row = col.row()
		row.separator()
		
		row = col.row()
		row.prop(collection["Layer 6"], 'is_visible', toggle=True, text='Fingers')

		row = col.row()
		row.prop(collection["Layer 7"], 'is_visible', toggle=True, text='Fingers (Detail)')

		row = col.row()
		row.separator()
		
		row = col.row()
		row.prop(collection["Layer 8"], 'is_visible', toggle=True, text='Arm.L (IK)')
		row.prop(collection["Layer 11"], 'is_visible', toggle=True, text='Arm.R (IK)')
		
		row = col.row()
		row.prop(collection["Layer 9"], 'is_visible', toggle=True, text='Arm.L (FK)')
		row.prop(collection["Layer 12"], 'is_visible', toggle=True, text='Arm.R (FK)')

		row = col.row()
		row.prop(collection["Layer 10"], 'is_visible', toggle=True, text='Arm.L (Tweak)')
		row.prop(collection["Layer 13"], 'is_visible', toggle=True, text='Arm.R (Tweak)')

		row = col.row()
		row.separator()
		
		row = col.row()
		row.prop(collection["Layer 14"], 'is_visible', toggle=True, text='Leg.L (IK)')
		row.prop(collection["Layer 17"], 'is_visible', toggle=True, text='Leg.R (IK)')

		row = col.row()
		row.prop(collection["Layer 15"], 'is_visible', toggle=True, text='Leg.L (FK)')
		row.prop(collection["Layer 18"], 'is_visible', toggle=True, text='Leg.R (FK)')

		row = col.row()
		row.prop(collection["Layer 16"], 'is_visible', toggle=True, text='Leg.L (Tweak)')
		row.prop(collection["Layer 19"], 'is_visible', toggle=True, text='Leg.R (Tweak)')

		row = col.row()
		row.separator()
		
		row = col.row()
		row.prop(collection["Layer 20"], 'is_visible', toggle=True, text='Custom ')

		row = col.row()
		row.separator()
		row = col.row()
		row.separator()

		row = col.row()
		row.prop(collection["Layer 29"], 'is_visible', toggle=True, text='Root')
python
	def draw(self, context):
        layout = self.layout
        col = layout.column()

        row = col.row()
        row.prop(context.active_object.data, 'layers', index=1, toggle=True, text='Face ')
        row.prop(context.active_object.data, 'layers', index=2, toggle=True, text='Face (detail) ')

        row = col.row()
        row.prop(context.active_object.data, 'layers', index=3, toggle=True, text='Torso')

        row = col.row()
        row.prop(context.active_object.data, 'layers', index=4, toggle=True, text='Torso (Tweak)')

        row = col.row()
        row.prop(context.active_object.data, 'layers', index=5, toggle=True, text='Fingers')

        row = col.row()
        row.prop(context.active_object.data, 'layers', index=6, toggle=True, text='Fingers (Detail)')

        row = col.row()
        row.prop(context.active_object.data, 'layers', index=7, toggle=True, text='Arm.L (IK)')
        row.prop(context.active_object.data, 'layers', index=10, toggle=True, text='Arm.R (IK)')

        row = col.row()
        row.prop(context.active_object.data, 'layers', index=8, toggle=True, text='Arm.L (FK)')
        row.prop(context.active_object.data, 'layers', index=11, toggle=True, text='Arm.R (FK)')

        row = col.row()
        row.prop(context.active_object.data, 'layers', index=9, toggle=True, text='Arm.L (Tweak)')
        row.prop(context.active_object.data, 'layers', index=12, toggle=True, text='Arm.R (Tweak)')

        row = col.row()
        row.prop(context.active_object.data, 'layers', index=13, toggle=True, text='Leg.L (IK)')
        row.prop(context.active_object.data, 'layers', index=16, toggle=True, text='Leg.R (IK)')

        row = col.row()
        row.prop(context.active_object.data, 'layers', index=14, toggle=True, text='Leg.L (FK)')
        row.prop(context.active_object.data, 'layers', index=17, toggle=True, text='Leg.R (FK)')

        row = col.row()
        row.prop(context.active_object.data, 'layers', index=15, toggle=True, text='Leg.L (Tweak)')
        row.prop(context.active_object.data, 'layers', index=18, toggle=True, text='Leg.R (Tweak)')

        row = col.row()
        row.prop(context.active_object.data, 'layers', index=19, toggle=True, text='Custom ')

        row = col.row()
        row.separator()
        row = col.row()
        row.separator()

        row = col.row()
        row.prop(context.active_object.data, 'layers', index=28, toggle=True, text='Root')

Released under the MIT License.