Rigify IK Parent reset on Re-generate Rig

Is there a way to have rigify set the default IK Parent for the hands to, for example, the Chest instead of the root?

I’m currently adding things to the metarig as I go, it is not all planned in advance so I constantly add or change a few things here and there and hit regenerate but that makes the IK Parent forget what I set and have to do all that work again everytime.

Is there a way to set it at metarig level?

Hi, yes you have the options in the control panel for all of those.
For whatever you are adding changing do it in the rigify rig.

Yeah I i’m setting it there but if I hit regenerate again, it will go back to the default. For example, I’m setting the Hands to “none” but when I regenerate the rig it goes back to “root” it doesn’t remember what I set…

That is expected, because you are regenerating a new rig. use the rigify rig to make the changes.
What are the changes you have made?
There could be an option for changing it in the script? But i am not familiar with that.

I thought there was a standard way, seems like a trivial thing to do. It should be in the Rigify settings the initial parent of the IK control points…

I wanted a quick “push this button” type of solution, I could invest time in reading the python script and do changes but this is not a priority for me right now so I will just leave it as an unsolved mistery for the X Files…

This is not a mystery that information is stored in the rig controls when you are deleting the rig controls and generating a new set you are deleting that information.

Hey, I figured it out:

  1. In your Blender folder for example - Program Files\Blender Foundation\Blender 3.6\3.6\scripts\addons\rigify\rigs\limbs
    find - limb_rigs.py

  2. Just in case save a copy of it.

  3. In the python file named limb_rigs.py, around line 442 find this part:

     self.register_switch_parents(pbuilder)
    
     pbuilder.build_child(
         self, ctrl.ik, prop_bone=master, select_parent='root',
         prop_id='IK_parent', prop_name='IK Parent', controls=controls,
     )
    
  4. Change it to this (pay attention to the paragraph order):

     self.register_switch_parents(pbuilder)
     select_parent = 'chest' if 'hand' in ctrl.ik else 'root'
    
     pbuilder.build_child(
         self, ctrl.ik, prop_bone=master, select_parent=select_parent,
         prop_id='IK_parent', prop_name='IK Parent', controls=controls,
     )
    
  5. Save the modified limb_rigs.py

  6. Open Blender, and try a rigify rig, for example a Human (Meta-Rig)