Page MenuHome

Visibility flags cannot be used as driver variables
Closed, ArchivedPublicKNOWN ISSUE

Description

System Information
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.20

Blender Version
Broken: version: 2.82 (sub 3), branch: master, commit date: 2019-12-03 17:56, hash: rBfda791ab1241

Short description of error
If you link (driver) viewport visibility to another visibility, change of source object is not reflected to driver

Exact steps for others to reproduce the error

  1. Open
  2. Change viewport visibility on Empty object
  3. Cube object visibility is still visible even it is linked (driver)
  4. If you animate Empty visibility, it works good. Also render visibility works

Event Timeline

Germano Cavalcante (mano-wii) lowered the priority of this task from 90 to 30.Dec 16 2019, 1:06 PM

I don't know if I understand the bug.
This seems like intended behavior.
(Same with and without driver)

It is more clear from this gif:

Visibility is linked with driver but not work, until I paste some key. Render visibility works normal.

Germano Cavalcante (mano-wii) raised the priority of this task from 30 to 90.Dec 16 2019, 5:11 PM
Jacques Lucke (JacquesLucke) changed the task status from Needs Triage to Confirmed.Dec 29 2019, 3:50 PM

I can confirm this issue. It also prints this in the terminal:

add_relation(RNA Target -> Driver) - Could not find op_from (RnaPathKey(id: OBEmpty, prop: 'hide_viewport'))
add_relation(RNA Target -> Driver) - Failed, but op_to (OperationKey(type: PARAMETERS, component name: '', operation code: DRIVER, 'hide_viewport')) was ok
add_relation(RNA Target -> Driver) - Could not find op_from (RnaPathKey(id: OBEmpty, prop: 'hide_render'))
add_relation(RNA Target -> Driver) - Failed, but op_to (OperationKey(type: PARAMETERS, component name: '', operation code: DRIVER, 'hide_render')) was ok
Sybren A. Stüvel (sybren) changed the subtype of this task from "Report" to "Bug".Jan 14 2020, 10:39 AM

T64705: Linked armatures can't drive mesh visibility shows that driving visibility should be possible, so this is a bug.

Sybren A. Stüvel (sybren) claimed this task.
Sybren A. Stüvel (sybren) changed the subtype of this task from "Bug" to "Known Issue".

My earlier analysis was incorrect. Driving visibility is possible, it's having the hide_viewport or hide_render properties as driver variables that's the issue. The underlying cause is that these properties are not defined on the object itself, but on the 'base', which is an internal technicality of Blender. In short, a single object can have different visibilities in different view layers, making it hard to use those properties as driver variables.

I'm closing this as a known architectural limitation. I've added this issue to my Animation: Weak Areas wiki page so that it's not forgotten.

As a workaround, you can add the objects for which the visibility has to be linked to a collection, and shift-click the visibility icons of that collection to toggle them on all contained objects simultaneously.

Sybren A. Stüvel (sybren) renamed this task from Visibility driver is not reflected in the viewport to Visibility flags cannot be used as driver variables.Jan 14 2020, 5:49 PM