ViewLayer(bpy_struct)

base class — bpy_struct

class bpy.types.ViewLayer.ViewLayer(bpy_struct)

View layer

active_layer_collection

Active layer collection in this view layer’s hierarchy

Type

LayerCollection, (never None)

cycles

Cycles ViewLayer Settings

Type

CyclesRenderLayerSettings, (readonly)

depsgraph

Dependencies in the scene data

Type

Depsgraph, (readonly)

eevee

View layer settings for EEVEE

Type

ViewLayerEEVEE, (readonly, never None)

freestyle_settings
Type

FreestyleSettings, (readonly, never None)

invert_zmask

For Zmask, only render what is behind solid z values instead of in front

Type

boolean, default False

layer_collection

Root of collections hierarchy of this view layer,its ‘collection’ pointer property is the same as the scene’s master collection

Type

LayerCollection, (readonly, never None)

material_override

Material to override all other materials in this view layer

Type

Material

name

View layer name

Type

string, default “”, (never None)

objects

All the objects in this layer

Type

LayerObjects bpy_prop_collection of Object, (readonly)

pass_alpha_threshold

Z, Index, normal, UV and vector passes are only affected by surfaces with alpha transparency equal to or higher than this threshold

Type

float in [0, 1], default 0.0

samples

Override number of render samples for this view layer, 0 will use the scene setting

Type

int in [0, inf], default 0

use

Enable or disable rendering of this View Layer

Type

boolean, default False

use_all_z

Fill in Z values for solid faces in invisible layers, for masking

Type

boolean, default False

use_ao

Render Ambient Occlusion in this Layer

Type

boolean, default False

use_edge_enhance

Render Edge-enhance in this Layer (only works for Solid faces)

Type

boolean, default False

use_freestyle

Render stylized strokes in this Layer

Type

boolean, default False

use_halo

Render Halos in this Layer (on top of Solid)

Type

boolean, default False

use_pass_ambient_occlusion

Deliver Ambient Occlusion pass

Type

boolean, default False

use_pass_combined

Deliver full combined RGBA buffer

Type

boolean, default False

use_pass_diffuse_color

Deliver diffuse color pass

Type

boolean, default False

use_pass_diffuse_direct

Deliver diffuse direct pass

Type

boolean, default False

use_pass_diffuse_indirect

Deliver diffuse indirect pass

Type

boolean, default False

use_pass_emit

Deliver emission pass

Type

boolean, default False

use_pass_environment

Deliver environment lighting pass

Type

boolean, default False

use_pass_glossy_color

Deliver glossy color pass

Type

boolean, default False

use_pass_glossy_direct

Deliver glossy direct pass

Type

boolean, default False

use_pass_glossy_indirect

Deliver glossy indirect pass

Type

boolean, default False

use_pass_material_index

Deliver material index pass

Type

boolean, default False

use_pass_mist

Deliver mist factor pass (0.0-1.0)

Type

boolean, default False

use_pass_normal

Deliver normal pass

Type

boolean, default False

use_pass_object_index

Deliver object index pass

Type

boolean, default False

use_pass_shadow

Deliver shadow pass

Type

boolean, default False

use_pass_subsurface_color

Deliver subsurface color pass

Type

boolean, default False

use_pass_subsurface_direct

Deliver subsurface direct pass

Type

boolean, default False

use_pass_subsurface_indirect

Deliver subsurface indirect pass

Type

boolean, default False

use_pass_transmission_color

Deliver transmission color pass

Type

boolean, default False

use_pass_transmission_direct

Deliver transmission direct pass

Type

boolean, default False

use_pass_transmission_indirect

Deliver transmission indirect pass

Type

boolean, default False

use_pass_uv

Deliver texture UV pass

Type

boolean, default False

use_pass_vector

Deliver speed vector pass

Type

boolean, default False

use_pass_z

Deliver Z values pass

Type

boolean, default False

use_sky

Render Sky in this Layer

Type

boolean, default False

use_solid

Render Solid faces in this Layer

Type

boolean, default False

use_strand

Render Strands in this Layer

Type

boolean, default False

use_volumes

Render volumes in this Layer

Type

boolean, default False

use_zmask

Only render what’s in front of the solid z values

Type

boolean, default False

use_ztransp

Render Z-Transparent faces in this Layer (on top of Solid and Halos)

Type

boolean, default False

classmethod update_render_passes()

Requery the enabled render passes from the render engine

update()

Update data tagged to be updated from previous access to data or operators

classmethod bl_rna_get_subclass(id, default=None)
Parameters

id (string) – The RNA type identifier.

Returns

The RNA type or default when not found.

Return type

bpy.types.Struct subclass

classmethod bl_rna_get_subclass_py(id, default=None)
Parameters

id (string) – The RNA type identifier.

Returns

The class or default when not found.

Return type

type

Inherited Properties

  • bpy_struct.id_data

Inherited Functions

  • bpy_struct.as_pointer

  • bpy_struct.driver_add

  • bpy_struct.driver_remove

  • bpy_struct.get

  • bpy_struct.is_property_hidden

  • bpy_struct.is_property_overridable_library

  • bpy_struct.is_property_readonly

  • bpy_struct.is_property_set

  • bpy_struct.items

  • bpy_struct.keyframe_delete

  • bpy_struct.keyframe_insert

  • bpy_struct.keys

  • bpy_struct.path_from_id

  • bpy_struct.path_resolve

  • bpy_struct.pop

  • bpy_struct.property_overridable_library_set

  • bpy_struct.property_unset

  • bpy_struct.type_recast

  • bpy_struct.values

References

  • bpy.context.view_layer

  • Context.view_layer

  • Depsgraph.view_layer

  • Depsgraph.view_layer_eval

  • LayerCollection.has_selected_objects

  • Object.hide_get

  • Object.hide_set

  • Object.holdout_get

  • Object.indirect_only_get

  • Object.select_get

  • Object.select_set

  • Object.visible_get

  • RenderEngine.register_pass

  • RenderEngine.update_render_passes

  • Scene.view_layers

  • ViewLayers.new

  • ViewLayers.remove

  • Window.view_layer