バージョン:2.8以降
説明:ViewLayerによく使うレンダリング設定をセットします。
カテゴリ:ViewLayer
import bpy
VL_name="View Layer"
bpy.context.scene.eevee.taa_render_samples = 16
bpy.context.scene.render.filter_size = 1.5
bpy.context.scene.render.film_transparent = True
bpy.context.scene.view_settings.view_transform = 'Standard'
bpy.context.scene.render.filepath = "//render/sample/sample_"
bpy.context.scene.render.dither_intensity = 0
bpy.context.scene.view_layers[VL_name].use_pass_z = True
bpy.context.scene.eevee.shadow_cube_size = '4096'
bpy.context.scene.eevee.shadow_cascade_size = '4096'
bpy.context.scene.eevee.use_shadow_high_bitdepth = True
bpy.context.scene.eevee.light_threshold = 0
for i in bpy.context.scene.view_layers[VL_name].aovs:
bpy.ops.scene.view_layer_remove_aov()
bpy.ops.scene.view_layer_add_aov()
bpy.context.scene.view_layers[VL_name].active_aov_index = 0
bpy.context.scene.view_layers[VL_name].active_aov.name = "v_color"
bpy.ops.scene.view_layer_add_aov()
bpy.context.scene.view_layers[VL_name].active_aov_index = 1
bpy.context.scene.view_layers[VL_name].active_aov.name = "n_color"
Blenderってプリセットがないので、レンダリング設定が面倒ですよね。
でもよく使うものはPythonから実行すれば簡単ですね。サンプルコードは、セルルックCGでよくやる設定です。