Auto Update Dependencies in the Driver Editor?


For a simple illustration, I have this code in the text editor. This is then inputted in the driver editor. It works, initially. However, when I move the driver, in this case the Sphere, It no longer works.
I have to click update dependencies for the current state of the Sphere to affect the driver.

def drive_me(count):

    val =["Sphere"].location[2] + count
    return val

import bpy["drive_me"] = drive_me

You can see what I’m trying to access here (dropbox link):

Hey, You have a warning message “Python restricted for security” - my guess is that you do not have “Auto run python” enabled in the user prefs, take a look and see if that is the case.

1 Like


Thanks for the response.
I’m assuming you meant
Save & Load > Auto Run Python Scripts

If so, I tried enabling it, but I still have to hit Update Dependencies for the changes to show. :frowning:

Ummm, prob not the same, in the user prefs there should be a box to check to allow it, not on 2.8x so I will have to look thru the manual to find the location.
EDIT; after looking in the manual ,I think you are correct.

As far as your issue goes, add a variable(does not matter what) that points to the object that you are using the input of - it’s an old hack but works.