Skip to content

Commit 2e23368

Browse files
committed
force wgt update fix: crashing for incorrect context if rig is not in obj mode
1 parent b711dc2 commit 2e23368

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

generate.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ def generate_rig(context, metarig):
119119
# Remove wgts if force update is set
120120
wgts_group_name = "WGTS_" + (rig_old_name or obj.name)
121121
if wgts_group_name in scene.objects and id_store.rigify_force_widget_update:
122+
bpy.ops.object.mode_set(mode='OBJECT')
122123
bpy.ops.object.select_all(action='DESELECT')
123124
for i, lyr in enumerate(WGT_LAYERS):
124125
if lyr:

0 commit comments

Comments
 (0)