Scripted driver breaks my bbone chain

I’m trying to script bbone chains with bezier handles and noticed, when i add the necessary drivers, that my Start-and End Handle relationship is breaking. Well not really breaking but they get ignored, overwritten, i dunno what exactly happens.

I prepared this scene for you, so you can try it yourself. You see two bbone chains with start-and end handles, side by side.

The right chain has the necessary drivers to make the bezier handles work (the ones that sitting on the chain). You can grab and rotate the start- and end handles and rotate it and it will influence the curvature of the bbone chain. In addition you can grab the bezier handles and influence the chain on top of that.

The left chain has no drivers yet. You can rotate the start-and end handles and it will influence the curvature of the bbone chain. Now run the script. The bezier handles are working now but the start-and end handles no longer influence the curvature of the bbone chain.

I also noticed that, scripted drivers on an attribute didn’t get colored (purple) like when you do it manually. There is actually no indication that a driver controls that attribute. If i right click on that driven attribute, the ‘Edit Driver’ option is not available. However opening the Driver Editor, its there.

Before i send a bug report i want to make sure that i dont miss anything. Maybe i did something wrong, you tell me.

Of couse it would be helpful if i actually uploaded the prepared blend file. Sorry for that.

BBone_addDrv.blend (741.0 KB)