Skip to main content
Blender 3.0+
Source Link
p2or
  • 16.1k
  • 10
  • 87
  • 146

In the object properties, youYou can turn off Ray Visibility of the 'emission object' for the camera:

enter image description here


As of. In Blender 23.760+ go to Object Properties > Visibility, open up the Ray Visibility panel was renamed toand disable the Cycles SettingsCamera property:

enter image description hereenter image description here


As of Blender 2.8x, Ray Visibility panel is now part of the new Visibility Panel:

enter image description here


As of Blender 2.76 the Ray Visibility panel was renamed to Cycles Settings:

enter image description here


Blender 2.7x

enter image description here


You can also run thisthe following script to toggle the Camera Ray Visibility for selectedall selected objects (updated for 2.8x):

Blender 3.1+

import bpy

for obj in bpy.context.selected_objects:

    # toggle mesh lights
    if obj.type == 'MESH':
        for slot in obj.material_slots:
            if slot.material:
                for node in slot.material.node_tree.nodes:
                    if node.type == "EMISSION":
                        obj.visible_camera = not obj.visible_camera

    # toggle light types
    if obj.type == 'LIGHT':
        obj.visible_camera = not obj.visible_camera

Blender 2.8+

import bpy

for obj in bpy.context.selected_objects:

    # toggle mesh lights
    if obj.type == 'MESH':
        for slot in obj.material_slots:
            if slot.material:
                for node in slot.material.node_tree.nodes:
                    if node.type == "EMISSION":
                        obj.cycles_visibility.camera = not obj.cycles_visibility.camera

    # toggle light types
    if obj.type == 'LIGHT':
        obj.cycles_visibility.camera = not obj.cycles_visibility.camera

In the object properties, you can turn off Ray Visibility of the 'emission object' for the camera:

enter image description here


As of Blender 2.76 the Ray Visibility panel was renamed to Cycles Settings:

enter image description here


As of Blender 2.8x, Ray Visibility panel is now part of the new Visibility Panel:

enter image description here


You can also run this script to toggle the Camera Ray Visibility for selected objects (updated for 2.8x):

import bpy

for obj in bpy.context.selected_objects:

    # toggle mesh lights
    if obj.type == 'MESH':
        for slot in obj.material_slots:
            if slot.material:
                for node in slot.material.node_tree.nodes:
                    if node.type == "EMISSION":
                        obj.cycles_visibility.camera = not obj.cycles_visibility.camera

    # toggle light types
    if obj.type == 'LIGHT':
        obj.cycles_visibility.camera = not obj.cycles_visibility.camera

You can turn off Ray Visibility of the 'emission object'. In Blender 3.0+ go to Object Properties > Visibility, open up the Ray Visibility panel and disable the Camera property:

enter image description here


As of Blender 2.8x, Ray Visibility panel is now part of the new Visibility Panel:

enter image description here


As of Blender 2.76 the Ray Visibility panel was renamed to Cycles Settings:

enter image description here


Blender 2.7x

enter image description here


You can also run the following script to toggle the Camera Ray Visibility for all selected objects:

Blender 3.1+

import bpy

for obj in bpy.context.selected_objects:

    # toggle mesh lights
    if obj.type == 'MESH':
        for slot in obj.material_slots:
            if slot.material:
                for node in slot.material.node_tree.nodes:
                    if node.type == "EMISSION":
                        obj.visible_camera = not obj.visible_camera

    # toggle light types
    if obj.type == 'LIGHT':
        obj.visible_camera = not obj.visible_camera

Blender 2.8+

import bpy

for obj in bpy.context.selected_objects:

    # toggle mesh lights
    if obj.type == 'MESH':
        for slot in obj.material_slots:
            if slot.material:
                for node in slot.material.node_tree.nodes:
                    if node.type == "EMISSION":
                        obj.cycles_visibility.camera = not obj.cycles_visibility.camera

    # toggle light types
    if obj.type == 'LIGHT':
        obj.cycles_visibility.camera = not obj.cycles_visibility.camera
Blender 2.8x updates
Source Link
p2or
  • 16.1k
  • 10
  • 87
  • 146

In the object properties, you can turn off Ray Visibility of the 'emission object' for the camera:

enter image description here


InAs of Blender 2.76 the Ray Visibility panel was renamed to Cycles Settings:

enter image description here


As of Blender 2.8x, Ray Visibility panel is now part of the new Visibility Panel:

enter image description here


You can also run this script to enable or disabletoggle the Camera Ray Visibility for all objects in the sceneCamera Ray Visibility for selected objects (updated for 2.8x):

import bpy

for obj in bpy.datacontext.objectsselected_objects:
    
    # toggle mesh lights
    if obj.type == 'MESH':
        nodesfor =slot in obj.data.materials[0].node_treematerial_slots:
            if slot.nodesmaterial:
                for node in slot.material.node_tree.nodes:
                    if node.type == "EMISSION":
                        obj.cycles_visibility.camera = not obj.cycles_visibility.camera
     
    # toggle lampslight types
    if obj.type == 'LAMP''LIGHT':
        obj.cycles_visibility.camera = not obj.cycles_visibility.camera

In the object properties, you can turn off Ray Visibility of the 'emission object' for the camera:

enter image description here


In Blender 2.76 the Ray Visibility panel was renamed to Cycles Settings:

enter image description here


You can also run this script to enable or disable the Camera Ray Visibility for all objects in the scene:

import bpy

for obj in bpy.data.objects:
    
    # toggle mesh lights
    if obj.type == 'MESH':
        nodes = obj.data.materials[0].node_tree.nodes
        for node in nodes:
            if node.type == "EMISSION":
                obj.cycles_visibility.camera = not obj.cycles_visibility.camera
     
    # toggle lamps
    if obj.type == 'LAMP':
        obj.cycles_visibility.camera = not obj.cycles_visibility.camera

In the object properties, you can turn off Ray Visibility of the 'emission object' for the camera:

enter image description here


As of Blender 2.76 the Ray Visibility panel was renamed to Cycles Settings:

enter image description here


As of Blender 2.8x, Ray Visibility panel is now part of the new Visibility Panel:

enter image description here


You can also run this script to toggle the Camera Ray Visibility for selected objects (updated for 2.8x):

import bpy

for obj in bpy.context.selected_objects:

    # toggle mesh lights
    if obj.type == 'MESH':
        for slot in obj.material_slots:
            if slot.material:
                for node in slot.material.node_tree.nodes:
                    if node.type == "EMISSION":
                        obj.cycles_visibility.camera = not obj.cycles_visibility.camera

    # toggle light types
    if obj.type == 'LIGHT':
        obj.cycles_visibility.camera = not obj.cycles_visibility.camera
Blender 2.76
Source Link
p2or
  • 16.1k
  • 10
  • 87
  • 146

In the object properties, you can turn off the Ray Visibility Ray Visibility of the Emission object'emission object' for the camera.:

enter image description here


In Blender 2.76 the Ray Visibility panel was renamed to Cycles Settings:

enter image description here


You can also run this script to enable or disable the Camera Ray Visibility for all objects in the scene:

import bpy

for obj in bpy.data.objects:
    
    # toggle mesh lights
    if obj.type == 'MESH':
        nodes = obj.data.materials[0].node_tree.nodes
        for node in nodes:
            if node.type == "EMISSION":
                obj.cycles_visibility.camera = not obj.cycles_visibility.camera
     
    # toggle lamps
    if obj.type == 'LAMP':
        obj.cycles_visibility.camera = not obj.cycles_visibility.camera

In the object properties, you can turn off the Ray Visibility of the Emission object for the camera.

enter image description here


You can also run this script to enable or disable the Camera Ray Visibility for all objects in the scene:

import bpy

for obj in bpy.data.objects:
    
    # toggle mesh lights
    if obj.type == 'MESH':
        nodes = obj.data.materials[0].node_tree.nodes
        for node in nodes:
            if node.type == "EMISSION":
                obj.cycles_visibility.camera = not obj.cycles_visibility.camera
     
    # toggle lamps
    if obj.type == 'LAMP':
        obj.cycles_visibility.camera = not obj.cycles_visibility.camera

In the object properties, you can turn off Ray Visibility of the 'emission object' for the camera:

enter image description here


In Blender 2.76 the Ray Visibility panel was renamed to Cycles Settings:

enter image description here


You can also run this script to enable or disable the Camera Ray Visibility for all objects in the scene:

import bpy

for obj in bpy.data.objects:
    
    # toggle mesh lights
    if obj.type == 'MESH':
        nodes = obj.data.materials[0].node_tree.nodes
        for node in nodes:
            if node.type == "EMISSION":
                obj.cycles_visibility.camera = not obj.cycles_visibility.camera
     
    # toggle lamps
    if obj.type == 'LAMP':
        obj.cycles_visibility.camera = not obj.cycles_visibility.camera
Added python code to toggle all objects in scene
Source Link
p2or
  • 16.1k
  • 10
  • 87
  • 146
Loading
Changed the content for faster undestanding
Source Link
Loading
Source Link
jasperge
  • 1.9k
  • 14
  • 17
Loading