Error when collection visibility property is used in driver expression (fixed in main, backport request) #109570

Closed
opened 2023-07-01 00:01:11 +02:00 by R. C. Randolph · 5 comments

System Information
Blender: version: 3.6.0, branch: blender-v3.6-release, commit date: 2023-06-27 08:08, hash: c7fc78b81e
platform: 'macOS-12.6-x86_64-i386-64bit'

Short description of error
When trying to use collection properties as a driver, the following error comes up in the terminal

Failed to add relation "RNA Target -> Driver"
Could not find op_from: RnaPathKey(id: GRCollection, prop: 'hide_viewport')

Trace:

Depth    Type                     Name
-----    ----                     ----
1        Object                   Cube

This appears to be related to #98525, which occurs when the wrong data block type is assigned in the driver. However, collection is correctly assigned in this case.

It looks like the GR in id: GRCollection stands for group, since these first two letters are OB for object drivers, ME for mesh drivers, etc. My guess is somewhere this was supposed to be changed from GR to CL and it's been missed so far.

Exact steps for others to reproduce the error

In the attached file, the cube viewport visibility is supposed to be driven by the collection viewport visibility. It does not update automatically (though it can be convinced to update manually,) and the error above appears on depsgraph update.

**System Information** Blender: version: 3.6.0, branch: blender-v3.6-release, commit date: 2023-06-27 08:08, hash: c7fc78b81ecb platform: 'macOS-12.6-x86_64-i386-64bit' **Short description of error** When trying to use collection properties as a driver, the following error comes up in the terminal ``` Failed to add relation "RNA Target -> Driver" Could not find op_from: RnaPathKey(id: GRCollection, prop: 'hide_viewport') Trace: Depth Type Name ----- ---- ---- 1 Object Cube ``` --------------------------------------------------------------------- This appears to be related to #98525, which occurs when the wrong data block type is assigned in the driver. However, collection is correctly assigned in this case. It looks like the GR in id: GRCollection stands for group, since these first two letters are OB for object drivers, ME for mesh drivers, etc. My guess is somewhere this was supposed to be changed from GR to CL and it's been missed so far. **Exact steps for others to reproduce the error** In the attached file, the cube viewport visibility is supposed to be driven by the collection viewport visibility. It does not update automatically (though it can be convinced to update manually,) and the error above appears on depsgraph update.
R. C. Randolph added the
Status
Needs Triage
Type
Report
Priority
Normal
labels 2023-07-01 00:01:11 +02:00
Member

Hi, I can confirm the error in console

It looks like the GR in id: GRCollection stands for group... My guess is somewhere this was supposed to be changed from GR to CL and it's been missed so far.

This is not correct though. First two letters of id represents id_type (ID_GR is used for collection) and remaining letter refers to the name of the id (if collection name is col-1, id will be GRcol-1)

Hi, I can confirm the error in console > It looks like the GR in id: GRCollection stands for group... My guess is somewhere this was supposed to be changed from GR to CL and it's been missed so far. This is not correct though. First two letters of id represents id_type ([ID_GR is used for collection](https://projects.blender.org/blender/blender/src/branch/main/source/blender/makesdna/DNA_ID_enums.h#L67)) and remaining letter refers to the name of the id (if collection name is col-1, id will be GRcol-1)
Member

Appears to be fixed in 4.0

Appears to be fixed in 4.0
Pratik Borhade changed title from Driver ID not updated from Group to Collection to Error when collection visibility property is used in driver expression 2023-07-03 11:37:13 +02:00
Pratik Borhade added this to the 3.6 LTS milestone 2023-07-03 11:39:07 +02:00
Member

Fixed between 8c6908eba578 - 23862ec60e38
@lichtwerk , can you check?
I think one of the Sergey's commit on depsgragh fixed this bug (61ed5b3d24 ?).

Fixed between `8c6908eba578 - 23862ec60e38` @lichtwerk , can you check? I think one of the Sergey's commit on depsgragh fixed this bug (61ed5b3d246d5a218e7c4166f5e9d3ed892d57b0 ?).
Iliya Katushenock added the
Module
Core
label 2023-07-03 12:05:06 +02:00
Member

Yeah, 61ed5b3d24 seems to be the fix (not sure if 94f5ea9731 would also be needed).

@Sergey : if you consider these safe for backporting to 3.6 LTS, you could add them to #109399 (then close this issue).
If not, I think this issue could be closed straight away (since it is fixed in main).

Yeah, 61ed5b3d246d5a218e7c4166f5e9d3ed892d57b0 seems to be the fix (not sure if 94f5ea97313 would also be needed). @Sergey : if you consider these safe for backporting to 3.6 LTS, you could add them to #109399 (then close this issue). If not, I think this issue could be closed straight away (since it is fixed in main).
Philipp Oeser changed title from Error when collection visibility property is used in driver expression to Error when collection visibility property is used in driver expression (fixed in main, backport request) 2023-07-04 14:33:55 +02:00

@lichtwerk I am not aware of any issues caused by those commits (and yes, you need both of them). So from this point of view they should be safe and trivial to cherry-pick.

What puzzles me a bit is that it was not intended to be a bug fix. It is not impossible there is initially unforeseen effect. So if you sure it is the commit which fixed the issue and is fine from the LTS release perspective we surely can add those commits to the backport queue.

@lichtwerk I am not aware of any issues caused by those commits (and yes, you need both of them). So from this point of view they should be safe and trivial to cherry-pick. What puzzles me a bit is that it was not intended to be a bug fix. It is not impossible there is initially unforeseen effect. So if you sure it is the commit which fixed the issue and is fine from the LTS release perspective we surely can add those commits to the backport queue.
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-07-05 11:46:09 +02:00
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#109570
No description provided.