From 3bd86cdc5ac8cc6acb462e36e729929052d4c1ad Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl <cessen@cessen.com> Date: Fri, 15 Feb 2013 15:30:45 +0000 Subject: [PATCH] Rigify bugfix: deleted WGT objects now get properly replaced on generation. WGT objects were sticking around even when the user deleted them since they were being used by the bones for visual appearance. This meant that if the user deleted the WGT objects in order for Rigify to regenerate them the next time around, Rigify would fail. Rigify now checks for this circumstance and handles it appropriately. --- rigify/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rigify/utils.py b/rigify/utils.py index db66da636..379e1ea16 100644 --- a/rigify/utils.py +++ b/rigify/utils.py @@ -281,6 +281,7 @@ def create_widget(rig, bone_name, bone_transform_name=None): # This is necessary so we can then create the object without # name conflicts. if obj_name in bpy.data.objects: + bpy.data.objects[obj_name].user_clear() bpy.data.objects.remove(bpy.data.objects[obj_name]) # Create mesh object -- GitLab