Hide_viewport currently broken?

When porting an addon to 2.80 yesterday, I noticed that while hiding an object via .hide_viewport = True kind of works, unhiding it via .hide_viewport = False does absolutely nothing. So I figured that since the outliner is currenly being reworked, the API must be broken. I’d just like to get confirmation that that is the case, and I’m not just using it wrong.

obj.hide_viewport works for me, hiding and unhiding.

Note that the outliner does not hide objects using that prop, and neither does Blender’s object.hide_view_set() operator (H, SHIFT-H, ALT-H). They hide on the view layer level, which we can’t do via the API right now.

Also note, that there is this bug right now.

I assume hiding on the object level is going to be phased out and replaced with hiding on the view layer level, but I’m not sure.

Yes, the objects I want to unhide via code are previously hidden by the user in the outliner by clicking on the eye icon. So this really is impossible at this time.
I don’t suppose the devs ever said anything about when they would reimplement this feature, did they?

I think so, yes.

Not that I’m aware of no. I’ve been wanting to do this since November, and find it odd they would introduce a change in behavior like this, without making it accessible via python.

A real bummer, but thanks very much for bringing me up to speed. I feel your pain now. :relieved:

rBcae89a6889e0 :slight_smile:
The bug I mentioned above is also fixed!

Thank you @brecht

1 Like

I just downloaded today’s build, and yes, I can confirm that hiding and unhiding objects is finally working again. Thank goodness. :+1:
I hope that .hide_get/set() stays the way it is until the stable release.