I am using Blender for some scientific-related visualization. As such I guess my needs are much more modest than those of the average animator, and the decoupling of the visibility and renderability of objects (i.e., the fact I can set some object to rendered although it is not visible in preview) only causes problems for me, when I change what is visible but forget to also set it to be rendered, only to come back 15 minutes later and see that I had rendered the wrong scene. Is there some way to "couple" visibility and renderability, i.e. only whatever is set as visible is also set as renderable?
You could also do this with Python!
To do so you could run the following code, manually, before rendering:
import bpy for obj in bpy.data.objects: obj.hide_render = obj.hide
A better solution would be to somehow run the code automagically before rendering, which can be done as follows:
import bpy def unhide(self): for obj in bpy.data.objects: obj.hide_render = obj.hide bpy.app.handlers.render_pre.append(unhide)
To make the script run every time you open up the blend file, name your text block with a
.py extension and check
Note that you must run the script once;
Here is a simple process to do before rendering:
- Deselect all your object A
- Hit Alt-H to unhide all the objects
- Without changing the selection, hit Ctrl-H, your objects will be hidden
- Hit H to hide them again.
For better scene organization I suggest you to use the new layer management addon. With this you can simply disable a layer if you don't want to render it.