Page MenuHome

Drivers with custom python functions are broken
Open, Needs Triage by DeveloperPublic

Description

System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GTX 1060 3GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 430.64

Blender Version
Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: rBf6cb5f54494e

Short description of error
This was a problem in 2.79 too, so I guess it's not high priority, but I just wanted to put it here since i couldn't find it on the site.
Basically if you write a custom function in Python that controls the value of some properties on other objects, and then use it in the expression field of a driver, those properties update in the Properties panel, but not in the viewport, and old ways of manually updating the driver have no effect now (see attached .blend file for more details).

A very short term and janky solution could be to make the "Update dependancies" accessible from Python

Exact steps for others to reproduce the error

Just open the .blend file and run the script in the Text editor. I wrote 2 methods to control properties trough driver function but none of them work (the driver with the custom function is on propHolder.rotation_euler[0])

Details

Type
Bug

Event Timeline