Rigify: how to disable "DEF-toe.L/R"

A pair of similar topics from years ago on similar topics that nevertheless don’t quite give the answer I’m looking for:

I am trying to make a Rigify rig containing individual toes, and the “adding toes” part isn’t the problem - the problem is disabling the deformation due to the toe bones from the original leg rigs without breaking the rest of the original leg rigs, or the entire rig itself, as happens if I just delete the original metarig’s toe bones. Is there a setting I can change so that the deformation bone isn’t generated, or a Python script I can attach to the metarig?

If there’s no automatic way to do it, I can always delete the deformation bones in the generated rig, of course, but I’d prefer an automatic way.

Just make needed bones in your metarig in edit mode choose “raw copy” for each bone you don’t want rigify generating def bones. You can even create constraints on these bones and activate “relink constraints” checkbox for each of these bones. You will get your bones with constraints, without any additional bones.

Thank you, but unfortunately all that does is generate bones “toe.L” and “toe.R” (that aren’t hooked up to anything) in the rig without actually disabling the generation of the toe deformation bones. It looks to me like that’s something built into the “limbs.leg” type - like if there’s a toe bone at all, (which I want to keep for the leg pivot function) it will necessarily generate a deform bone.

Hm. Maybe I didn’t quiet understood what exactly do you want to achieve. My english isn’t best so don’t blame me too much for that. I don’t get why do you want to delete generated “def” bones for toes? Let them exist. :slightly_smiling_face:

Just turn the deformation bones you don’t want off by unchecking the deform bone box in pose mode and then just move them to another layer and hide them.

Does this help:

There is one final stage to rig generation. Rigify checks all of the bones

for “DEF-”, “MCH-”, and “ORG-” prefixes, and moves those bones to their own

layers. It also sets all of the “DEF-” bones to deform, and sets all other

bones to not deform. And finally, it looks for any bone that does not have

a parent, and sets the root bone (which Rigify creates) as their parent.

source:

That does help. What I’ve settled upon is - if kludgy - writing a Python script to be entered in the metarig’s “run script” box to just cut out the bones after generation, specifically:

import bpy
import fnmatch
print("Running remove_toe_defs.py")
armature = bpy.data.objects["rig"].data
bpy.ops.object.mode_set(mode='EDIT') 

for bone in armature.edit_bones:
    if fnmatch.fnmatchcase(bone.name, "DEF-toe.L") or fnmatch.fnmatchcase(bone.name, "DEF-toe.R"): 
        print("Removed "+bone.name)
        armature.edit_bones.remove(bone)
bpy.ops.object.mode_set(mode='OBJECT') 
print("Completed remove_toe_defs.py")

And in my tests, it works.
Thank you all for your help!

2 Likes