ViewLayer(bpy_struct)

base class — bpy_struct

class bpy.types.ViewLayer(bpy_struct)

View layer

active_aov

Active AOV (readonly)

Type:

AOV

active_aov_index

Index of active AOV (in [0, inf], default 0)

Type:

int

active_layer_collection

Active layer collection in this view layer’s hierarchy (never None)

Type:

LayerCollection

active_lightgroup

Active Lightgroup (readonly)

Type:

Lightgroup

active_lightgroup_index

Index of active lightgroup (in [0, inf], default 0)

Type:

int

aovs

(default None, readonly)

Type:

AOVs[AOV]

depsgraph

Dependencies in the scene data (readonly)

Type:

Depsgraph

eevee

View layer settings for EEVEE (readonly, never None)

Type:

ViewLayerEEVEE

freestyle_settings

(readonly, never None)

Type:

FreestyleSettings

has_export_collections

At least one Collection in this View Layer has an exporter (default False, readonly)

Type:

bool

layer_collection

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

Type:

LayerCollection

lightgroups

(default None, readonly)

Type:

Lightgroups[Lightgroup]

material_override

Material to override all other materials in this view layer

Type:

Material

name

View layer name (default “”, never None)

Type:

str

objects

All the objects in this layer (default None, readonly)

Type:

LayerObjects[Object]

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 (in [0, 1], default 0.5)

Type:

float

pass_cryptomatte_depth

Sets how many unique objects can be distinguished per pixel (in [2, 16], default 6)

Type:

int

samples

Override number of render samples for this view layer, 0 will use the scene setting (in [0, inf], default 0)

Type:

int

use

Enable or disable rendering of this View Layer (default True)

Type:

bool

use_ao

Render Ambient Occlusion in this Layer (default True)

Type:

bool

use_freestyle

Render stylized strokes in this Layer (default True)

Type:

bool

use_grease_pencil

Render Grease Pencil on this layer (default True)

Type:

bool

use_motion_blur

Render motion blur in this Layer, if enabled in the scene (default True)

Type:

bool

use_pass_ambient_occlusion

Deliver Ambient Occlusion pass (default False)

Type:

bool

use_pass_combined

Deliver full combined RGBA buffer (default True)

Type:

bool

use_pass_cryptomatte_accurate

Generate a more accurate cryptomatte pass (default True)

Type:

bool

use_pass_cryptomatte_asset

Render cryptomatte asset pass, for isolating groups of objects with the same parent (default False)

Type:

bool

use_pass_cryptomatte_material

Render cryptomatte material pass, for isolating materials in compositing (default False)

Type:

bool

use_pass_cryptomatte_object

Render cryptomatte object pass, for isolating objects in compositing (default False)

Type:

bool

use_pass_diffuse_color

Deliver diffuse color pass (default False)

Type:

bool

use_pass_diffuse_direct

Deliver diffuse direct pass (default False)

Type:

bool

use_pass_diffuse_indirect

Deliver diffuse indirect pass (default False)

Type:

bool

use_pass_emit

Deliver emission pass (default False)

Type:

bool

use_pass_environment

Deliver environment lighting pass (default False)

Type:

bool

use_pass_glossy_color

Deliver glossy color pass (default False)

Type:

bool

use_pass_glossy_direct

Deliver glossy direct pass (default False)

Type:

bool

use_pass_glossy_indirect

Deliver glossy indirect pass (default False)

Type:

bool

use_pass_grease_pencil

Deliver Grease Pencil render result in a separate pass (default False)

Type:

bool

use_pass_material_index

Deliver material index pass (default False)

Type:

bool

use_pass_mist

Deliver mist factor pass (0.0 to 1.0) (default False)

Type:

bool

use_pass_normal

Deliver normal pass (default False)

Type:

bool

use_pass_object_index

Deliver object index pass (default False)

Type:

bool

use_pass_position

Deliver position pass (default False)

Type:

bool

use_pass_shadow

Deliver shadow pass (default False)

Type:

bool

use_pass_subsurface_color

Deliver subsurface color pass (default False)

Type:

bool

use_pass_subsurface_direct

Deliver subsurface direct pass (default False)

Type:

bool

use_pass_subsurface_indirect

Deliver subsurface indirect pass (default False)

Type:

bool

use_pass_transmission_color

Deliver transmission color pass (default False)

Type:

bool

use_pass_transmission_direct

Deliver transmission direct pass (default False)

Type:

bool

use_pass_transmission_indirect

Deliver transmission indirect pass (default False)

Type:

bool

use_pass_uv

Deliver texture UV pass (default False)

Type:

bool

use_pass_vector

Deliver speed vector pass (default False)

Type:

bool

use_pass_z

Deliver depth values pass (default False)

Type:

bool

use_sky

Render Sky in this Layer (default True)

Type:

bool

use_solid

Render Solid faces in this Layer (default True)

Type:

bool

use_strand

Render Strands in this Layer (default True)

Type:

bool

use_volumes

Render volumes in this Layer (default True)

Type:

bool

world_override

Override world in this view layer

Type:

World

bl_system_properties_get(*, do_create=False)

DEBUG ONLY. Internal access to runtime-defined RNA data storage, intended solely for testing and debugging purposes. Do not access it in regular scripting work, and in particular, do not assume that it contains writable data

Parameters:

do_create (bool) – Ensure that system properties are created if they do not exist yet (optional)

Returns:

The system properties root container, or None if there are no system properties stored in this data yet, and its creation was not requested

Return type:

PropertyGroup

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 (str) – The RNA type identifier.

  • default (bpy.types.Struct | None) – The value to return when not found.

Returns:

The RNA type or default when not found.

Return type:

bpy.types.Struct

classmethod bl_rna_get_subclass_py(id, default=None, /)
Parameters:
  • id (str) – The RNA type identifier.

  • default (type | None) – The value to return when not found.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties

Inherited Functions

References