Drivers not working when closing and reloading a Blender file.

Hey, guys

I’ve been working on an environment lighting system that works to create realistic environment lighting by combining procedural sky and cloud generation, that changes based on the sun direction. I’ve been having a hard time with drivers in general, since they are pretty tricky in the first place.

One problem that I’ve not been able to solve is that some drivers seem to stop working after I close and re-open the file. The ones that stop working are usually ones that need to synchronize one Node value field to another. I do not have this problem for node values that are driven by objects on the scene.

I know most of this can be overcome by programming in Python instead of using drivers, but I am not a developer. I would have a hard time going this way.

Below is an example of the problem at hand.


First thing to look at is; have you checked “Autorun Python Scripts” in User Prefs => File Tab and saved your preferences. Scripted expression drivers will not work unless you do this, but other types probably will. Check in the Console for messages like “Reload Trusted”, “Driver Expression Error”, etc. You could also look at whether you have linked objects that are not surviving close down of Blender, etc. etc. Also check you have not moved or renamed something that might be required, to be honest I am guessing without more info.

If that doesn’t cure it - I will need to see a blend file.

Cheers, Clock.

Thanks, Clockmender!
I have enabled Autorun Python. Not tested the console to see what happens. I am not sure how a linked object may not survive closing Blender…

I will take another stab at it, and send you the blend if I fail.

Did you manage to get this sorted, I’m having the same problem where I have set a mix value of one node to match another. I selected the slider and chose ‘Add Single from Target’ then used the eyedropper to select the other slider. A python Script controls the master node. Each time I reload the file the connection is broken but the slider remains pink as though it should be working.

If I recall, the variable from nodes has to be copied through the data properties in the outliner. (You’ll know it’s the right one, when altering that variable makes the node’s value change as well.) It’s some quirk to how that data is updated or passed around. I’ve done a few driver scripts with materials where this had to be done. Not very intuitive to the usual way of doing things though.