addon request: Hide and Do Not Render object per camera view

I am putting out a request for an addon that allows me to:

select an object or multiple objects in a scene

select a camera

using a short-cut (like Ctrl-P for Parenting), open a dialog box with options for “Hide Object From Camera View” and “Do Not Render Object From Camera View”.

My thanks to anyone who can code and release this.

Simple. This addon will add an option that you can find by pressing spacebar and typing “Set Render On/Off”. Just select the objects you don’t want to render, then use this operation to make them unrenderable or vice versa. If you want to hide something from the camera view, I recommend moving the objects to another layer or using the hide function (press ‘H’)

Copy this code and put it into a file called set_render_status.py and save it. Open Blender and go to file > user preferences > install from file > navigate to the .py file and install it.


import bpy

bl_info = {
    "name": "Set Render Status", 
    "category": "3D View"}

class SetRenderOff(bpy.types.Operator):
    bl_idname = "object.set_render_off"
    bl_label = "Set Render Off"
    bl_options = {'REGISTER', 'UNDO'}
    
    def execute(self, context):
        
        for obj in context.selected_objects:
            obj.hide_render = True
        
        return {'FINISHED'}

class SetRenderOn(bpy.types.Operator):
    bl_idname = "object.set_render_on"
    bl_label = "Set Render On"
    bl_options = {'REGISTER', 'UNDO'}
    
    def execute(self, context):
        
        for obj in context.selected_objects:
            obj.hide_render = False
        
        return {'FINISHED'}

def register():
    bpy.utils.register_module(__name__)
    
def unregister():
    bpy.utils.unregister_module(__name__)

Hi, thanks for the work, however this does not do what I am looking for, so I probably was too vague.

As example, I have CamA, CamB and a Sphere in a scene. I want Sphere to render when seen from CamA but not to render when seen from CamB.

This will allow me to set “image as plane” objects for environments, positioned based on which camera is being looked through. Doing so, I can set up multiple cameras in a scene, then “hide” and “do not render” objects from specific cameras. This allows me to create my camera cuts in the default view and render a long scene in one render, like a several minutes long scene with multiple camera cuts and cameras. To have to hide those objects manually per camera switch adds unnecessary overhead to production time. It would be awesome to be able to select multiple objects, then select a camera, press a shortcut, and have a dialog box open with “Do Not Render object from this camera” and “Hide object from this camera” options for a single object, multiple objects or grouped objects.

Regardless, I appreciate the work you put in, very cool of you to take the time.