Page MenuHome

Calling bpy.ops.object.select_all from driver throws Runtime error
Open, Needs Triage by DeveloperPublic

Description

System Information
Operating system: Darwin-18.7.0-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon HD - FirePro D500 OpenGL Engine ATI Technologies Inc. 4.1 ATI-2.11.20

Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-11-14 09:40, hash: rBc25a910e4ec0
Worked: (optional)

Short description of error
Calling bpy.ops.object.select_all(action='DESELECT') from driver throws:

BPyOpsSubModOp._view_layer_update(context)

File "/Applications/Blender 2.81.app/Contents/Resources/2.81/scripts/modules/bpy/ops.py", line 159, in _view_layer_update
  view_layer.update()

RuntimeError: Error: Dependency graph update requested during evaluation

This is independent of the value of action. Not sure if this is bug or a change of design, but it used to work on 2.79{F8077517}
2.80 will get in an infinite loop, 2.81 throws an error.

Exact steps for others to reproduce the error
From Workspace "Scripting" Run script driver_functions.py to register driver
Switch to Workspace Animation
A driver function "invert" is installed in the Scene object for the Alpha property with input from "prop"
With the driver selected, execute Update Dependencies
Console will show error listed above.

[Please describe the exact steps needed to reproduce the issue]
[Based on the default startup or an attached .blend file (as simple as possible)]

Details

Type
Bug

Related Objects