Driver read but not write values to linked objects #70893

Closed
opened 2019-10-17 12:51:55 +02:00 by J. Kissel · 5 comments

System Information
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 436.15

Blender Version
Broken: version: 2.81 (sub 11), branch: master, commit date: 2019-09-16 21:02, hash: 76650402f3
Worked: (optional)

Short description of error
Setting a value to linked objects works with

bpy.data.objects['myCube'].pass_index = 2

or

bpy.data.objects['myCube'].pass_index = bpy.data.objects['Controller']['my_new_index']

but not when accessed via driver

Exact steps for others to reproduce the error
Ok, I dont know if this is a limitation , a bug, a missunderstandment from me or a wrong setup as seen in the Image
but
my driver reads the correct value from the linked object "myCube" and I can set the value via Python
Driver_problem.jpg

I created myCube in a second file

  • my cube has different colors based on object Index
    I create a mainfile and link myCube in

  • to test the linked Connection I change myCube.pass_index via Python

  • colors of myCube changes accordingly
    I create a Driver with single property set to myCube.pass_index
    value is shown as set in myCube file
    I create second var that catches the value of a custom property called my_new_index from "Controller" object
    I change "my_new_index" and the Driver value changes accordingly but

  • Colors dont change - so pass index is not changed

  • to test the linked Connection I change myCube.pass_index via Python

  • colors of myCube changes accordingly

it seems that values of linked objects can be Change with Python and can be read by a Driver but not written

[Based on the default startup or an attached .blend file (as simple as possible)]
here are the files - myCube has to be in assets Folder reletiv to Main.blend
Main.blend
myCube.blend

**System Information** Operating system: Windows-10-10.0.18362 64 Bits Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 436.15 **Blender Version** Broken: version: 2.81 (sub 11), branch: master, commit date: 2019-09-16 21:02, hash: `76650402f3` Worked: (optional) **Short description of error** Setting a value to linked objects works with ``` bpy.data.objects['myCube'].pass_index = 2 ``` or ``` bpy.data.objects['myCube'].pass_index = bpy.data.objects['Controller']['my_new_index'] ``` but not when accessed via driver **Exact steps for others to reproduce the error** Ok, I dont know if this is a limitation , a bug, a missunderstandment from me or a wrong setup as seen in the Image but my driver reads the correct value from the linked object "myCube" and I can set the value via Python ![Driver_problem.jpg](https://archive.blender.org/developer/F7829271/Driver_problem.jpg) I created myCube in a second file - > my cube has different colors based on object Index I create a mainfile and link myCube in - > to test the linked Connection I change myCube.pass_index via Python - > colors of myCube changes accordingly I create a Driver with single property set to myCube.pass_index value is shown as set in myCube file I create second var that catches the value of a custom property called my_new_index from "Controller" object I change "my_new_index" and the Driver value changes accordingly but - > Colors dont change - so pass index is not changed - > to test the linked Connection I change myCube.pass_index via Python - > colors of myCube changes accordingly **it seems that values of linked objects can be Change with Python and can be read by a Driver but not written** [Based on the default startup or an attached .blend file (as simple as possible)] here are the files - myCube has to be in assets Folder reletiv to Main.blend [Main.blend](https://archive.blender.org/developer/F7829336/Main.blend) [myCube.blend](https://archive.blender.org/developer/F7829337/myCube.blend)
Author

Added subscriber: @Masterheavy

Added subscriber: @Masterheavy
Author

Additional:
connection lost.jpg
The Driver connection is lost after closing and reopening the Scene (Main.blend)

Additional: ![connection lost.jpg](https://archive.blender.org/developer/F7829360/connection_lost.jpg) The Driver connection is lost after closing and reopening the Scene (Main.blend)
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'
Philipp Oeser self-assigned this 2019-12-29 14:58:22 +01:00
Member

From those files, I cannot tell how this is supposed to work:

I change "my_new_index" and the Driver value changes accordingly but
--> Colors dont change - so pass index is not changed

  • this driver is on a custom property of the collection instance (how is this supposed to drive the pass index of the linked object?)

It is true you can change properties on linked IDs via python (but not permanently, these are lost on file save/reload), but to my knowledge you cannot drive them.
For this to work properly, you need to use the old Proxy System (or the new Library Overrides)
Also you should not read from the same value, add to it and write to it, this will result in dependency cycles.
(it is better to already rig the pass_index in the myCube.blend file with something that can be used as a proxy from the Main.blend, so they dont end up in a dependency cycle)

https://docs.blender.org/manual/en/dev/files/linked_libraries/library_proxies.html
https://docs.blender.org/manual/en/dev/files/linked_libraries/library_overrides.html

If I have not misunderstood something, this sounds like no bug, I think we'll have to close this report (feel free though to comment again if you think I have misunderstood your report -- or if issues persist using the other mentioned methods)

From those files, I cannot tell how this is supposed to work: > I change "my_new_index" and the Driver value changes accordingly but > --> Colors dont change - so pass index is not changed - this driver is on a custom property of the collection instance (how is this supposed to drive the pass index of the linked object?) It is true you can change properties on linked IDs via python (but not permanently, these are lost on file save/reload), but to my knowledge you cannot drive them. For this to work properly, you need to use the old Proxy System (or the new Library Overrides) Also you should not read from the same value, add to it and write to it, this will result in dependency cycles. (it is better to already rig the pass_index in the myCube.blend file with something that can be used as a proxy from the Main.blend, so they dont end up in a dependency cycle) https://docs.blender.org/manual/en/dev/files/linked_libraries/library_proxies.html https://docs.blender.org/manual/en/dev/files/linked_libraries/library_overrides.html If I have not misunderstood something, this sounds like no bug, I think we'll have to close this report (feel free though to comment again if you think I have misunderstood your report -- or if issues persist using the other mentioned methods)
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
2 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#70893
No description provided.