I have a scenario in which I would like to have the option to toggle Auto Rotate on for the palette Arcball Cam. Since there is already a keyboardinDAT, I add this expression to the callbacks:
if key == 'r' and state == True: parent.ArcBall.par.Autorotate = not parent.ArcBall.par.Autorotate
This successfully accomplishes what I want, toggling the CustomPar that is ultimately driving a paramExec. The problem is, although nothing errors out and everything appears to behave as expected, auto rotate will no longer function when toggled off and on via python from within the KeyboardinDAT callbacks. If i further break it out into text dats and run them as scripts, it performs properly, but as soon as I execute those from within the keyboardinDAT callbacks, it breaks as well. Am I crazy?
Linked is an example with easily reproduce-able behavior. give the panel object a spin, toggle the Auto Rotate parameter on and off and see that it behaves as expected. now run scriptOff and scriptOn, see that those also produce the desired effect. Finally run these scripts by hovering over the arcball and clicking ‘r’ to toggle Rotate, and see that this is no longer working.