Drivers - Invalid python expression after rendering #74080

Closed
opened 2020-02-21 16:36:48 +01:00 by thierrry kobyleski · 13 comments

System Information
Linux
Nvidia GTX 780

Blender Version
Broken: 2.82
Worked: (optional)

The property "Use for rendering" in View Layer Properties panel can be driven ... until the first render.

Exact steps for others to reproduce the error
#74080.blend

  • Open .blend file
  • Scrub timeline, see driver working
  • Render image
  • Scrub timeline

Driver no longer works

**System Information** Linux Nvidia GTX 780 **Blender Version** Broken: 2.82 Worked: (optional) The property "Use for rendering" in View Layer Properties panel can be driven ... until the first render. **Exact steps for others to reproduce the error** [#74080.blend](https://archive.blender.org/developer/F8358124/T74080.blend) - Open .blend file - Scrub timeline, see driver working - Render image - Scrub timeline Driver no longer works

Added subscriber: @thierrykobyleski

Added subscriber: @thierrykobyleski

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-02-21 17:12:11 +01:00

There was error in system console:

Dependency cycle detected:
  SCScene/Parameters Component/PARAMETERS_EVAL() depends on
  SCScene/Parameters Component/DRIVER(view_layers["Cube"].use) via 'Driver -> Driven Property'
  SCScene/Parameters Component/PARAMETERS_EVAL() via 'RNA Target -> Driver'
Detected 1 dependency cycles

Use this driver expression:
int(frame)%2==0

There was error in system console: ``` Dependency cycle detected: SCScene/Parameters Component/PARAMETERS_EVAL() depends on SCScene/Parameters Component/DRIVER(view_layers["Cube"].use) via 'Driver -> Driven Property' SCScene/Parameters Component/PARAMETERS_EVAL() via 'RNA Target -> Driver' Detected 1 dependency cycles ``` Use this driver expression: `int(frame)%2==0`
Richard Antalik changed title from Driving property "Use for rendering" in View Layer Properties panel fails after first render to Drivers - Invalid python expression after rendering 2020-02-21 17:28:14 +01:00

Changed status from 'Archived' to: 'Confirmed'

Changed status from 'Archived' to: 'Confirmed'
Richard Antalik removed their assignment 2020-02-27 14:48:15 +01:00
Member

Added subscribers: @Sergey, @JacquesLucke

Added subscribers: @Sergey, @JacquesLucke
Member

I get a different error in this file.

WARN (bke.anim_sys): /home/jacques/blender-git/blender/source/blender/blenkernel/intern/anim_sys.c:1726 BKE_animsys_store_rna_setting: Animato: Invalid path. ID = 'Scene',  'view_layers["Cube"].use[0]'
ERROR (bke.anim_sys): /home/jacques/blender-git/blender/source/blender/blenkernel/intern/anim_sys.c:4190 BKE_animsys_eval_driver: invalid driver - view_layers["Cube"].use[0]

After some investigation, the issue seems to be that during rendering the scene being rendered contains only one view layer; only the one that is rendered currently. Now, some code tries to find the Cube view layer due to the driver while the Sphere view layer is rendered, but does not find it for the reason mentioned above. This produces the invalid driver error. Unfortunately, I don't really understand how all of that fits together..

I tend to call this a known issue for now. @Sergey, what do you think?

I get a different error in this file. ``` WARN (bke.anim_sys): /home/jacques/blender-git/blender/source/blender/blenkernel/intern/anim_sys.c:1726 BKE_animsys_store_rna_setting: Animato: Invalid path. ID = 'Scene', 'view_layers["Cube"].use[0]' ERROR (bke.anim_sys): /home/jacques/blender-git/blender/source/blender/blenkernel/intern/anim_sys.c:4190 BKE_animsys_eval_driver: invalid driver - view_layers["Cube"].use[0] ``` After some investigation, the issue seems to be that during rendering the scene being rendered contains only one view layer; only the one that is rendered currently. Now, some code tries to find the `Cube` view layer due to the driver while the `Sphere` view layer is rendered, but does not find it for the reason mentioned above. This produces the `invalid driver` error. Unfortunately, I don't really understand how all of that fits together.. I tend to call this a known issue for now. @Sergey, what do you think?

@JacquesLucke, dependency graph always consists from a single view layer (no matter if it's render-only or viewport).

What's supposed to happen is all dependencies is what's used in the view layer are supposed to be pulled into the dependency graph. This means that when dependency graph builds Sphere is should see "aha, you need Cube for the driver. Lemme pull it into the dependency graph for you!"

There are tricky parts like how to detect whether ID is needed or not. Currently its based on driver variables IDs. As in, if there is an RNA path in the driver expression which references ID which is not in any of the variables then dependency graph will not see it.

So if the ID is referenced from variable "it should just work". It it's something more tricky like that then it's a known issue. Dependency graph can not parse python code to know used IDs. And there is simple workaround: add dependency as variable.

Hope it all makes sense :)

@JacquesLucke, dependency graph always consists from a single view layer (no matter if it's render-only or viewport). What's supposed to happen is all dependencies is what's used in the view layer are supposed to be pulled into the dependency graph. This means that when dependency graph builds `Sphere` is should see "aha, you need Cube for the driver. Lemme pull it into the dependency graph for you!" There are tricky parts like how to detect whether ID is needed or not. Currently its based on driver variables IDs. As in, if there is an RNA path in the driver expression which references ID which is not in any of the variables then dependency graph will not see it. So if the ID is referenced from variable "it should just work". It it's something more tricky like that then it's a known issue. Dependency graph can not parse python code to know used IDs. And there is simple workaround: add dependency as variable. Hope it all makes sense :)

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren

@thierrykobyleski what exactly do you want to achieve by animating the view layer's "use for render" property? The view layer seems to still be used in the compositor on all frames.

It helps us to have some context for the report. Is this an intrinsic issue that blocks an entire studio from working? Some recently introduced problem, where older versions of Blender did this just fine? Or is it just an experiment to see if this could work?

@thierrykobyleski what exactly do you want to achieve by animating the view layer's "use for render" property? The view layer seems to still be used in the compositor on all frames. It helps us to have some context for the report. Is this an intrinsic issue that blocks an entire studio from working? Some recently introduced problem, where older versions of Blender did this just fine? Or is it just an experiment to see if this could work?

Changed status from 'Confirmed' to: 'Needs User Info'

Changed status from 'Confirmed' to: 'Needs User Info'

Changed status from 'Needs User Info' to: 'Archived'

Changed status from 'Needs User Info' to: 'Archived'
Sybren A. Stüvel self-assigned this 2020-09-07 11:00:49 +02:00

No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed.

Thanks again for the report. If the problem persists please open a new report with the required information.

No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed. Thanks again for the report. If the problem persists please open a new report with the required information.
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
5 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#74080
No description provided.