How to automatically hide all viewport invisible objects in rendering?

A lot of times I started rendering forgetting to turn off that rendering visibility icon in the outliner.
Is there any way Blender can automatically hide all the invisible objects in the 3D viewport in the final rendering?

Oh, this is my fault, I am sorry.
Let me make myself clear.
I like to match the render visibility to the viewport, or should I say I like to only render the things that can be seen in the viewport.


i don’t understand? why do you want to turn off visibility for objects which are already invisible?

Run this script.

import bpy

for o in["Scene"].objects :
    o.hide_render = o.hide_get()

… assuming you are working on a scene called Scene.

Good luck.


the objects you’re highlighting are not invisible in viewport though…

1 Like

Render Visibility isn’t the same as Viewport Visibility and it is sometimes annoying to remember the difference in large scenes.

OP was highlighting the Render Visibility icons to supplement the question.

while I haven’t personally used these you may want to look at.

[Addon] Match Render Visibility (free) - Coding / Released Scripts and Themes - Blender Artists Community

Collection Visibility - Coding / Released Scripts and Themes - Blender Artists Community

1 Like

sure but he’s talking about synchonizing viewport visibility with render visibility, and in the image the viewport visibility is on, or i completely misunderstand his question…

Yea I think the image was just illustrative. The question was clear

Yepp… only difference: the empty is not selectable.

Okay… but he used that instead of the and added an image… showing something different :grin:

(Okay… maybe that’s nitpicking… but clear answers for clear questions :stuck_out_tongue_winking_eye: .)

i think zeroskilz gave the solution…

1 Like

One of the more infuriating annoyances in Blender…

  • e v e r y b o d y - coming in from another 3d app will run into this… :frowning:

We rolled our own panel/buttons to deal with this.

I wrote an addon that keeps it all automatically in sync


yes there should be a button somewhere to automatically sync

Thank you! This is a really good addon.

Wow, this addon is much easier, Thank you!

1 Like