2
$\begingroup$

So this guide https://docs.unity3d.com/Manual/BlenderAndRigify.html says to delete the WGT bones.

I'm guessing these are bones that were used to create the control polys for the rig... so why are these left laying around overcrowding my view tree instead of being deleted when the rig is done being generated?

Is there a way to easily remove the (100 some odd?) WGT bones all at once?

$\endgroup$

4 Answers 4

2
$\begingroup$
  • Select them by name in Object Mode Menu:Select / Select pattern,
  • Type WGT*
  • Delete the selected objects with X.
  • Open a text region and paste this script and press the run script button:

import bpy

scene = bpy.context.scene
for o in bpy.data.objects:
    print(o.name)
    if o.name.startswith('WGT'):
        o.select = True
        scene.objects.unlink(o)
$\endgroup$
2
  • $\begingroup$ I'm curious to see if this can be added to the generate.py script for rigify to make it clean up after itself $\endgroup$ Dec 23, 2016 at 20:22
  • $\begingroup$ And it would seem to work! $\endgroup$ Dec 23, 2016 at 20:35
2
$\begingroup$

They are left there so you can change the size/position of the controllers after the rigify rig is generated.

Sometimes, the controls result too small/big or inside the mesh and need adjusting. You use the WGT objects in layer 20, edit mode to do that.

$\endgroup$
0
$\begingroup$

There is a less complicated way to remove WTG. Right click each one and select delete. Simply highlighting and hitting delete does not work.

$\endgroup$
0
$\begingroup$
import bpy
scene = bpy.context.scene
bpy.ops.object.select_all(action='DESELECT')
for o in bpy.data.objects:
    print(o.name)
    if o.name.startswith('WGT'):
        o.select_set(True)
        bpy.data.objects.remove(o, do_unlink=True)
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .