# Rigify->Generate Rig doesn't create all rig layers in the properties ui

For some reason, after clicking Generate Rig for my armature I only get the following rig layers:

Torso, Fingers, Arm.L (IK), Arm.R (IK), Arm.R (FK), Arm.R (Tweak), Leg.L (IK), Leg.R (IK) buttons are all missing. The controllers themselves are actually there, but I have to manually unhide them using Alt-H or switching bone layers.

Adding a default metarig in a new empty blender file, and then using it to generate rig with Rigify correctly produces all of the above, so the problem must be something with my armature, but I have no clue what might be causing this.

EDIT: I was able to solve this by adding a new metarig into the scene and copying all the bone LocRotScale properties from the old one, using the script provided in this topic (thank you sambler): How to copy position, size from one armature to another?. Whatever the problem was, this fixed it and spared me from re-rigging everything from scratch.

• To make this more useful to others, could you post your edit as an answer? That way if someone with the same problem searches for questions about it and see this one, they will see it has an answer and are much more likely to get the information they need. May 20, 2018 at 20:36

Reposting the solution as an answer as requested.

I was able to solve this by adding a new metarig into the scene and copying all the bone LocRotScale properties from the old one, using the script provided in this topic (thank you sambler): How to copy position, size from one armature to another?. Whatever the problem was, this fixed it and spared me from re-rigging everything from scratch.

The only thing I had to change in that script was my source and target armature names at the top:

import bpy

source_rig = 'metarig_old'
dest_rigs = ['metarig']

############

bone_data = {}

def edit_rig(rigname):
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.select_all(action='DESELECT')

bpy.data.objects[rigname].select = True
bpy.context.scene.objects.active = bpy.data.objects[rigname]
bpy.ops.object.mode_set(mode='EDIT')

edit_rig(source_rig)
for b in bpy.data.objects[source_rig].data.edit_bones:

for arm_name in dest_rigs:
edit_rig(arm_name)
for b in bpy.data.objects[arm_name].data.edit_bones:

bpy.ops.object.mode_set(mode='OBJECT')


in Blender 2.9

import bpy

source_rig = '_old.metarig'
dest_rigs = ['_new.metarig']

bone_data = {}

def edit_rig(rigname):
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.select_all(action='DESELECT')

bpy.data.objects[rigname].select_set(True) # ------------------------> NEW CODE
bpy.context.view_layer.objects.active = bpy.data.objects[rigname] # ----------> NEW CODE
bpy.ops.object.mode_set(mode='EDIT')

edit_rig(source_rig)
for b in bpy.data.objects[source_rig].data.edit_bones:

for arm_name in dest_rigs:
edit_rig(arm_name)
for b in bpy.data.objects[arm_name].data.edit_bones:

bpy.ops.object.mode_set(mode='OBJECT')


How To Run The Script

• go to the Scripting workspace
• click the New button in the text editor to create a new text data-block
• copy the code from above and paste it into the text editor
• make sure the values of the variables source_rig and dest_rigs match the names of your armature objects
• click on the Run Script button (▶)

I had the exact same problem. I compared my meta-rig bones with those generated when creating a new rig. Switching to Pose Mode and selecting the missing bones, i have found out the problem under the Rigify Type section for the selected bone.

The Rig Type was missing and bbones segments were not properly set as in the reference one.