I’m trying to reset all the Stretch To constraints in the selected rig via a python script.
So far I’ve tried this:
for bone in bpy.context.selected_pose_bones:
override = bpy.context.copy(bone)
bpy.ops.constraint.stretchto_reset(override, constraint=“Stretch To”, owner=‘BONE’)
which returns the following error:
Traceback (most recent call last):
File “/media/data/glass_half/pre/test_rigs/flexirig-stretchto_fix.blend/Text”, line 5, in <module>
TypeError: copy() takes 1 positional argument but 2 were given
The problem seems to be how I’m using context copy. Any suggestions how I could get this working?