Are drivers for "hide_viewport" just not a thing anymore? (2.8)

Googling and searching forums is not giving me any information on this. I’m trying to switch to 2.8, but all of my viewport visibility drivers no longer work. In the driver edit/view interface

The driver is said to have an “invalid target channel”, but there is no way I can find to change it.

The target property that worked in 2.79 was (object).hide. Examining things in the python console, it appears to have been changed to (object).hide_viewport

I’d be happy to just add a new driver, but the context menu for object viewport visibility in the outliner has no “add driver” option.

Is this just a breaking design change, or a bug, or am I just doing something wrong? Thank you.

1 Like

I think you may have to put your driver on the material shaders now using a transparency.
If you find a better way, let me know.

There’s also the possibility of having a driver scale the object to 0 - often the simplest ways of making an object disappear. Can cause problems with motion blur though.

In that case it’s not an issue, because the “show render” option is keyframeable and drivable.

I tell a lie. Manual changes of “hide render” work, but keyframing and drivers don’t. The UI updates, but the actual status of whether an object renders does not update. That seems like a bug rather than a design choice.

Driving and keyframing both hide and hide_render are kind of a big part of my workflow. There are lots of cases where you need to make something appear and/or disappear.

Has anyone found a way around this? Perhaps something clever with collections or something? I haven’t been able to find a workaround or substitute, and it’s causing me issues.

Edited to add: I know there are other posts about this in various places, but all of the ones I can find are pretty old, so it’s worth asking that now that 2.8 is near release.

Oh, by the way… I’m using the build from Feb 19, but there are people saying it is still an issue even up to today. See also: https://developer.blender.org/T56635

So I suppose the question is if someone has found a workaround.

I was playing with this and I found a place you can put the driver for the display. If you go to the Object button under instancing, you can add a driver to the Display Instancer and the Render Instancer after you click faces and put your keyframes on it as well. I tried it using the “viewport render animation” with a bone just on display and it worked. Real user friendly LOL. I hate this learning curve. https://blenderartists.org/uploads/default/original/4X/9/9/f/99fc1f7785f15d3f70e9e3ab905790580f983b67.mp4

I think you only have that option when you are already working with an instance of the object, because the option is not present when just examining a regular object. That’s kind of unhelpful though, since when importing a rigged character, you tend to import all associated objects as one group. I guess I could find a way to use this as a workaround if I redo my rigging workflow. :frowning:

Edited: Oh, I misunderstood. You mean to MAKE the object an instancer of nothing, and then toggle instancer visibility/rendering. Wow, that… sure is a thing you can do

I found something very useful! With the latest build, the keyframing/driving of hide_render is fixed. Thanks devs!

Unfortunately, it is still not possible to add a driver or keyframe to viewport visibility through the normal outliner view. HOWEVER, in the outliner “Data API” view (you’ll want a nice big panel, not the default little sidebar) you can browse to:

Blendfile Data -> Objects -> (object name) -> Disable View

And from there you can use the icon representing the attribute state to make a driver or keyframe. I can only assume that the visibility icon in the default outliner view is not using the standard data display method, probably because of its more complicated functionality.

Note: There is no option to add a driver in the right-click menu, but the standard keyboard shortcut during mouseover will create a driver. In the “Blender 27x” input preset it is Ctrl-D, and I can’t at this moment be arsed to see if it different with the 2.8 default shortcut preset.

Of course, doing this sometimes crashes blender instantly… but so do a lot of other actions. Beta software, and all that.

2 Likes

Possibly this might be a solution:
To control the visibility of a mesh with a driver I am using a Mask Modifier with a Vertex Group that covers the whole mesh and add a driver to the Invert Toggle.

Please, check out this workaround: https://developer.blender.org/T58187#653632
It is quite simple and close to what we use to do in 2.7x.
Cheers

Oh, handy. I had not thought of that. Thank you!