Error when collection visibility property is used in driver expression (fixed in main, backport request) #109570
Blender: version: 3.6.0, branch: blender-v3.6-release, commit date: 2023-06-27 08:08, hash:
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.
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)
@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).
@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.
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?