Drivers with custom python functions are broken #68213

Closed
opened 2019-08-04 10:26:36 +02:00 by Marco · 6 comments

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: f6cb5f5449

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])

bug driver update.blend

**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: `f6cb5f5449` **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]) [bug driver update.blend](https://archive.blender.org/developer/F7648452/bug_driver_update.blend)
Author

Added subscriber: @Tareyes

Added subscriber: @Tareyes

Added subscriber: @WWS3D

Added subscriber: @WWS3D

{F8232639}yes im try to use drivers to move object by key frames value... and update do not work... It was working on 2.79 when I turn on trusted expresion... or something like that... but now I can't turn it on right now becouse not shows up.

{[F8232639](https://archive.blender.org/developer/F8232639/driver_bug.blend)}yes im try to use drivers to move object by key frames value... and update do not work... It was working on 2.79 when I turn on trusted expresion... or something like that... but now I can't turn it on right now becouse not shows up.

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'
Richard Antalik self-assigned this 2020-01-07 12:52:24 +01:00

@Tareyes from your blend file it seems that you are using drivers "backwards". I am no expert in this regard, in fact I had to follow manual on how this is supposed to work

When I follow https://docs.blender.org/manual/en/latest/animation/drivers/workflow_examples.html#custom-function-square-value, I have no issues.

@Tareyes from your blend file it seems that you are using drivers "backwards". I am no expert in this regard, in fact I had to follow manual on how this is supposed to work When I follow https://docs.blender.org/manual/en/latest/animation/drivers/workflow_examples.html#custom-function-square-value, I have no issues.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#68213
No description provided.