I have the following code and want to add a driver to the rest length of the stretch to constraint (bone constraint), but the console says that the property path is invalid. What am I doing wrong?
armature = Name of my armature
str(GrpName)+"_bone" = Name of the armatures bone
BaseLenghtDrv = bpy.data.objects[armature].pose.bones[str(GrpName)+"_bone"].driver_add('pose.bones["'+str(GrpName)+'_bone"].constraints["Stretch To"].rest_length').driver
The code before the driver_add
parentheses is definitely correct, I tested it with the rotation quaternion of the bone and it worked. But it doesn't work with the bone constraint.