Why does my PyDriver only update on frame-change? I have created a driver using this expression:
bpy.data.objects["e1"].location.x**2/5

It works whenever I change the frame but I'd like it to work on redraw. One solution that won't always be appropriate is to select the driven object along with the driving object. Is there a more universal solution?
Don't use bpy.data.*** because blender won't know to create a dependancy between the objects (this is why updates are not working properly),

Instead:


add a driver variable with the button Add Variable.
select object ID type.
then enter "e1" as the object name.
the location channels X axis are default.




Now you can use the variable name defined by the driver variable in place of: bpy.data.objects["e1"].location.x.