Animating Collection Visibility States

I wonder if it’s not planned to be able to add key-frames, or even set drivers for Collection visibility states (“Collection.hide_viewport”, “Collection.hide_render”).
It seems logical to have it, and also inconsistent to be able to do it for objects in the outliner, but not to collections of objects.
It’d be really useful for hiding/showing multiple objects at the same time in an animation.
I wonder if it’s a design issue, or if if it might be an easy project, but nobody has felt the need for it.

I know there are other ways of achieving this, but I think that since the collection is already controlling the visibility of multiple objects at the same time, seems logical to me that this should be animatable, and In my opinion would make Collections even more powerful that what they’ve already become.

I posted a similar question before, but In retrospect, i think it should be posted here in Development, and not in the Code-quest feedback (sorry, I just realized.)

2 Likes

I really feel this would be super useful (at least for me, but also for people using blender for motion graphics stuff). So knowing I’ll have some time to invest in this, I want to try to implement this.

The thing is; I just have only some coding experience ( mostly python scripting and some c# in the context of game creating in unity ). I want a developer’s opinion: Is this an insurmountable task to embark into for a novice coder, with very little understanding of low level stuff ?, in short, should I bother trying?

Or you think code-literate person skillful enough to navigate the code-base, with a push in the right direction, and the willingness to invest time into it and learn in the process, could succeed at it ?

And if so, where should I start digging into ?

I’ve learned to checkout different blender branches and compiling them from source, and managed to do minor test changes on the code, with success results.

HELP ! hehehe.

It’s intended to be possible but there are some implementation difficulties to be solved first, mainly that the dependency graph only includes objects that are visible, and when changing the frame we do not rebuild it because that would be too slow.

There are solutions to this, but it’s not something that a novice coder could tackle.

1 Like

Thanks for your answer Brecht, I imagined there had to be a considerable roadblock for it not being implemented yet, as it would seem natural to have that feature.
I’m glad to know it’s intended to be possible, I just regret not being able to help more.

I can definitely see it’s usefulness and I hope there is a solution that doesn’t mean slowing down the debs graph. But, if it’s going cause a slowdown with evaluation, I would rather not have it.

As an animator, deps graph performance it crucial.

Again, I do believe it would be useful but there is currently a way to animate the visibility on an object by object basis. Just not the collections.

While the ability to animate object visibility has been implemented, is the uni-directional dependency of hide_render and hide_viewport due to the deps graph only including visible objects?

To elaborate, we can have a driver on hide_viewport to use the value of hide_render but the other way around doesn’t work.

Also, while we can setup a variable to get a single object property, why when we enable Use Self and enter self.hide_render do we get a slow expression warning?