Driver expressions that use functions injected by an addon no longer work. #62280

Closed
opened 2019-03-06 19:55:42 +01:00 by Anton M · 6 comments

System Information
Operating system: Linux

Blender Version
Broken: 2.80, 18e5540a48 (2019-03-06)
Worked: 2.80 from a few days ago

Short description of error
Loading a .blend file that contains drivers that use functions injected by an addon results in python exceptions and driver expressions not being correctly evaluated. Here's an example of one such exception:

Error in Driver: The following Python expression failed:
        'mul5(3)'

Traceback (most recent call last):
  File "<bpy driver>", line 1, in <module>
NameError: name 'mul5' is not defined

Exact steps for others to reproduce the error

  1. Install attached test_module.py addon.
  2. Enable it in blender.
  3. While the addon is ON, open test.blend.
  4. What you'll see: an empty screen. What's expected: a stretched cube on X and Y axes.

test.blend
test_module.py

**System Information** Operating system: Linux **Blender Version** Broken: 2.80, 18e5540a48b6 (2019-03-06) Worked: 2.80 from a few days ago **Short description of error** Loading a .blend file that contains drivers that use functions injected by an addon results in python exceptions and driver expressions not being correctly evaluated. Here's an example of one such exception: ``` Error in Driver: The following Python expression failed: 'mul5(3)' Traceback (most recent call last): File "<bpy driver>", line 1, in <module> NameError: name 'mul5' is not defined ``` **Exact steps for others to reproduce the error** 1. Install attached test_module.py addon. 2. Enable it in blender. 3. While the addon is ON, open test.blend. 4. What you'll see: an empty screen. What's expected: a stretched cube on X and Y axes. [test.blend](https://archive.blender.org/developer/F6774270/test.blend) [test_module.py](https://archive.blender.org/developer/F6774271/test_module.py)
Author

Added subscriber: @peerz

Added subscriber: @peerz
Author

Reverting d31b2f8549 fixes the problem.

Reverting d31b2f854954838fb849b5b0be0011d792eecb43 fixes the problem.

Added subscriber: @TakeshiFunahashi

Added subscriber: @TakeshiFunahashi

I could see same problem. All scene which I saved with 2.8 armature which use driver expressions as function (generated by add on)
corrupted.

To correct it, I must need to up-date dependencies about all driver.

About attached file, it is same. If I up-date dependencies, now it show correctly.

I could see same problem. All scene which I saved with 2.8 armature which use driver expressions as function (generated by add on) corrupted. To correct it, I must need to up-date dependencies about all driver. About attached file, it is same. If I up-date dependencies, now it show correctly.
Brecht Van Lommel was assigned by Jacques Lucke 2019-03-07 10:41:30 +01:00

This issue was referenced by e25cdac24b

This issue was referenced by e25cdac24bc48cbb0f05f42b52e42adaaae63499

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
4 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#62280
No description provided.