The easiest way to hide and show rendering objects is to assign animation keys to them. To do this, move the cursor over the eye icon (visibility in the viewport) or camera (visibility when rendering) in the Outliner window, press the “i” key and then manage the created condition in the Graph Editor like the ordinary animation keys.
But this method is not always available. For example, we cannot assign visibility animation keys for collections, Blender will generate errors like:
“hide_viewport” property cannot be animated
or
“hide_render” property can not be animated
However, using the Blender Python API, we can control the visibility of such objects.
Changing objects visibility in the viewport and while renderingRead More »